21 lines
546 B
Rust
21 lines
546 B
Rust
|
mod args;
|
||
|
|
||
|
use smokepatio::ec::EmbeddedController;
|
||
|
|
||
|
fn main() {
|
||
|
let cli = args::Args::load();
|
||
|
println!("args: {:?}", cli);
|
||
|
|
||
|
let mut ec = EmbeddedController::new(cli.data_address, cli.cmd_address);
|
||
|
match cli.op {
|
||
|
args::Operation::ReadAll => todo!(),
|
||
|
args::Operation::Read { address } => {
|
||
|
println!("{:#02x}", ec.get(address));
|
||
|
},
|
||
|
args::Operation::WritePattern { } => todo!(),
|
||
|
args::Operation::Write { address, value } => {
|
||
|
ec.set(address, value);
|
||
|
},
|
||
|
}
|
||
|
}
|