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

Function send_command

framework_lib/src/ccgx/hid.rs:437–448  ·  view source on GitHub ↗
(device: &HidDevice, cmd_id: CmdId, cmd_param: u8)

Source from the content-addressed store, hash-verified

435}
436
437fn send_command(device: &HidDevice, cmd_id: CmdId, cmd_param: u8) -> Result<usize, HidError> {
438 device.write(&[
439 ReportIdCmd::E1Cmd as u8,
440 cmd_id as u8,
441 cmd_param,
442 0x00,
443 0xCC,
444 0xCC,
445 0xCC,
446 0xCC,
447 ])
448}
449
450fn write_row(device: &HidDevice, row_no: u16, row: &[u8]) -> Result<usize, HidError> {
451 let row_no_bytes = row_no.to_le_bytes();

Callers 3

flashing_modeFunction · 0.70
magic_unlockFunction · 0.70
flash_firmware_imageFunction · 0.70

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected