diff --git a/tool/src/main.rs b/tool/src/main.rs index eef1735..6eb9f0a 100644 --- a/tool/src/main.rs +++ b/tool/src/main.rs @@ -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) => {