From 5ce9fef2f59b2cad13a8460784f056db890700de Mon Sep 17 00:00:00 2001 From: XaviDCR92 Date: Tue, 8 Jan 2019 01:09:26 +0100 Subject: ACK from the device is received. Fixed serial configuration as "no parity". Added command-line argument "--cdimg-folder", used to retrieve data. --- src/main.rs | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 8afc13e..c7602c6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,6 @@ extern crate serial; +extern crate regex; +#[macro_use] extern crate lazy_static; mod cmdline; mod app; mod transfer; @@ -16,27 +18,3 @@ fn main() { } } } - -//~ /** let mut port = serial::open(&arg).unwrap(); - //~ interact(&mut port).unwrap();*/ - -//~ /// This function reconfigures a serial port with default parameters -//~ fn interact(port: &mut T) -> io::Result<()> { - //~ port.reconfigure(&|settings| { - //~ settings.set_baud_rate(serial::Baud9600)?; - //~ settings.set_char_size(serial::Bits8); - //~ settings.set_parity(serial::ParityNone); - //~ settings.set_stop_bits(serial::Stop1); - //~ settings.set_flow_control(serial::FlowNone); - //~ Ok(()) - //~ })?; - - //~ port.set_timeout(Duration::from_millis(1000))?; - - //~ let buf: Vec = (0..255).collect(); - - //~ port.write(&buf[..])?; - //~ //port.read(&mut buf[..])?; - - //~ Ok(()) -//~ } -- cgit v1.2.3