(command: &Command)
| 489 | } |
| 490 | |
| 491 | pub 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")] |
| 512 | pub fn handle_command( |
no test coverage detected