Remove windows specific code
This commit is contained in:
parent
cf8c624099
commit
e2c8ab733a
|
@ -6,10 +6,7 @@ use tokio_util::codec::{Decoder, Encoder};
|
|||
use bytes::BytesMut;
|
||||
use tokio_serial::SerialPortBuilderExt;
|
||||
|
||||
#[cfg(unix)]
|
||||
const DEFAULT_TTY: &str = "/dev/ttyUSB0";
|
||||
#[cfg(windows)]
|
||||
const DEFAULT_TTY: &str = "COM1";
|
||||
|
||||
struct LineCodec;
|
||||
|
||||
|
@ -47,7 +44,6 @@ pub async fn communicate() -> tokio_serial::Result<()> {
|
|||
let mut port = tokio_serial::new(tty_path, 115200).open_native_async()
|
||||
.expect("Unable to open serial port");
|
||||
|
||||
#[cfg(unix)]
|
||||
port.set_exclusive(false)
|
||||
.expect("Unable to set serial port exclusive to false");
|
||||
|
||||
|
|
Loading…
Reference in a new issue