Skip to content
Snippets Groups Projects
Commit 6cd44b94 authored by Federico Lolli's avatar Federico Lolli
Browse files

added baud rate option

parent 481d0ad0
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,10 @@ struct Cli {
/// The input csv file to read from
csv_input: PathBuf,
/// baud rate
#[clap(short, long, default_value = "115200")]
baud_rate: u32,
}
fn main() {
......@@ -56,7 +60,7 @@ fn main() {
std::process::exit(1);
};
debug!("connecting to for serial port {}...", port_name);
let mut port = serialport::new(port_name, 115200)
let mut port = serialport::new(port_name, args.baud_rate)
.open()
.expect("Failed to open serial port");
let mut write_port = port.try_clone().expect("Failed to clone");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment