MCPcopy Create free account
hub / github.com/FrameworkComputer/framework-system / get_fw_info

Function get_fw_info

framework_lib/src/ccgx/hid.rs:121–133  ·  view source on GitHub ↗
(device: &HidDevice)

Source from the content-addressed store, hash-verified

119}
120
121fn get_fw_info(device: &HidDevice) -> HidFirmwareInfo {
122 // Get 0x40 bytes from 0xE0
123 let mut buf = [0u8; 0x40];
124 buf[0] = ReportIdCmd::E0Read as u8;
125 info!("Get Report E0");
126 device
127 .get_feature_report(&mut buf)
128 .expect("Failed to get device FW info");
129
130 flashing_mode(device);
131
132 decode_fw_info(&buf)
133}
134
135pub fn check_ccg_fw_version(device: &HidDevice, verbose: bool) {
136 magic_unlock(device);

Callers 4

check_ccg_fw_versionFunction · 0.85
flash_firmwareFunction · 0.85
flash_firmware_imageFunction · 0.85
wait_to_reappearFunction · 0.85

Calls 2

flashing_modeFunction · 0.85
decode_fw_infoFunction · 0.85

Tested by

no test coverage detected