smokepatio/ecplorer/src/main.rs

21 lines
546 B
Rust
Raw Normal View History

2024-01-11 01:40:50 +00:00
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);
},
}
}