MCPcopy Index your code
hub / github.com/FrameworkComputer/framework-system / assert_win_len

Function assert_win_len

framework_lib/src/util.rs:267–272  ·  view source on GitHub ↗

Assert length of an EC response from the windows driver It's always 20 more than expected. TODO: Figure out why

(left: N, right: N)

Source from the content-addressed store, hash-verified

265/// Assert length of an EC response from the windows driver
266/// It's always 20 more than expected. TODO: Figure out why
267pub fn assert_win_len<N: Num + std::fmt::Debug + Ord + NumCast + Copy>(left: N, right: N) {
268 #[cfg(windows)]
269 assert_eq!(left, right + NumCast::from(20).unwrap());
270 #[cfg(not(windows))]
271 assert_eq!(left, right);
272}
273
274pub fn format_duration(duration: &Duration) -> String {
275 let hours = duration.as_secs() / 3600;

Callers 8

get_silicon_idMethod · 0.85
print_fw_infoMethod · 0.85
get_port_statusMethod · 0.85
set_charge_limitMethod · 0.85
set_fp_led_percentageMethod · 0.85
set_fp_led_levelMethod · 0.85
i2c_write_blockFunction · 0.85
i2c_writeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected