MCPcopy Index your code
hub / github.com/FrameworkComputer/inputmodule-rs / handle_generic_command

Function handle_generic_command

fl16-inputmodules/src/control.rs:491–509  ·  view source on GitHub ↗
(command: &Command)

Source from the content-addressed store, hash-verified

489}
490
491pub fn handle_generic_command(command: &Command) -> Option<[u8; 32]> {
492 match command {
493 Command::BootloaderReset => {
494 //let _ = serial.write("Bootloader Reset".as_bytes());
495 reset_to_usb_boot(0, 0);
496 None
497 }
498 Command::Panic => panic!("Ahhh"),
499 Command::Version => {
500 let mut response: [u8; 32] = [0; 32];
501 let bcd_device = device_release().to_be_bytes();
502 response[0] = bcd_device[0];
503 response[1] = bcd_device[1];
504 response[2] = is_pre_release() as u8;
505 Some(response)
506 }
507 _ => None,
508 }
509}
510
511#[cfg(feature = "ledmatrix")]
512pub fn handle_command(

Callers 1

handle_commandFunction · 0.85

Calls 2

device_releaseFunction · 0.85
is_pre_releaseFunction · 0.85

Tested by

no test coverage detected