Add LED_SAVE command
This commit is contained in:
committed by
Jeremy Soller
parent
17f8e37ed5
commit
0017450cbb
@ -371,6 +371,7 @@ fn main() {
|
||||
.validator(validate_from_str::<u8>)
|
||||
)
|
||||
)
|
||||
.subcommand(SubCommand::with_name("led_save"))
|
||||
.subcommand(SubCommand::with_name("matrix"))
|
||||
.subcommand(SubCommand::with_name("print")
|
||||
.arg(Arg::with_name("message")
|
||||
@ -571,6 +572,13 @@ fn main() {
|
||||
}
|
||||
}
|
||||
},
|
||||
("led_save", Some(_sub_m)) => match unsafe { ec.led_save() } {
|
||||
Ok(()) => (),
|
||||
Err(err) => {
|
||||
eprintln!("failed to save LED settings: {:X?}", err);
|
||||
process::exit(1);
|
||||
},
|
||||
},
|
||||
("matrix", Some(_sub_m)) => match unsafe { matrix(&mut ec) } {
|
||||
Ok(()) => (),
|
||||
Err(err) => {
|
||||
|
Reference in New Issue
Block a user