Add reset command to ectool
This commit is contained in:
@ -376,6 +376,7 @@ fn main() {
|
||||
)
|
||||
)
|
||||
.subcommand(SubCommand::with_name("led_save"))
|
||||
.subcommand(SubCommand::with_name("reset"))
|
||||
.subcommand(SubCommand::with_name("matrix"))
|
||||
.subcommand(SubCommand::with_name("print")
|
||||
.arg(Arg::with_name("message")
|
||||
@ -601,6 +602,13 @@ fn main() {
|
||||
process::exit(1);
|
||||
},
|
||||
},
|
||||
Some(("reset", _sub_m)) => match unsafe { ec.reset() } {
|
||||
Ok(()) => (),
|
||||
Err(err) => {
|
||||
eprintln!("failed to reset device: {:X?}", err);
|
||||
process::exit(1);
|
||||
},
|
||||
},
|
||||
Some(("matrix", _sub_m)) => match unsafe { matrix(&mut ec) } {
|
||||
Ok(()) => (),
|
||||
Err(err) => {
|
||||
|
Reference in New Issue
Block a user