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

Function simple_cmd_port

inputmodule-control/src/inputmodule.rs:424–431  ·  view source on GitHub ↗
(port: &mut Box<dyn SerialPort>, command: Command, args: &[u8])

Source from the content-addressed store, hash-verified

422}
423
424fn simple_cmd_port(port: &mut Box<dyn SerialPort>, command: Command, args: &[u8]) {
425 let mut buffer: [u8; 64] = [0; 64];
426 buffer[..2].copy_from_slice(FWK_MAGIC);
427 buffer[2] = command as u8;
428 buffer[3..3 + args.len()].copy_from_slice(args);
429 port.write_all(&buffer[..3 + args.len()])
430 .expect("Write failed!");
431}
432
433fn sleeping_cmd(serialdev: &str, arg: Option<bool>) {
434 let mut port = serialport::new(serialdev, 115_200)

Callers 15

get_device_versionFunction · 0.85
simple_cmdFunction · 0.85
simple_open_cmdFunction · 0.85
sleeping_cmdFunction · 0.85
debug_mode_cmdFunction · 0.85
brightness_cmdFunction · 0.85
animate_cmdFunction · 0.85
send_colFunction · 0.85
commit_colsFunction · 0.85
display_on_cmdFunction · 0.85
invert_screen_cmdFunction · 0.85
screensaver_cmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected