File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -39,12 +39,13 @@ features = [
3939
4040[dependencies ]
4141serde = { version = " 1.0" , features = [" derive" ], optional = true }
42- embedded-hal = { version = " =1.0.0-alpha.8" , optional = true }
42+ embedded-hal = { version = " =1.0.0-alpha.9" , optional = true }
43+ embedded-hal-nb = { version = " =1.0.0-alpha.1" , optional = true }
4344nb = { version = " 1" , optional = true }
4445
4546[dev-dependencies ]
4647clap = " 3.1.6"
4748
4849[features ]
4950default = [" libudev" ]
50- embedded = [" embedded-hal" , " nb" ]
51+ embedded = [" embedded-hal" , " embedded-hal-nb " , " nb" ]
Original file line number Diff line number Diff line change 44
55use std:: io;
66
7- use embedded_hal :: serial;
7+ use embedded_hal_nb :: serial;
88
99use crate :: SerialPort ;
1010
@@ -34,7 +34,7 @@ impl serial::ErrorType for Box<dyn SerialPort> {
3434 type Error = SerialError ;
3535}
3636
37- impl serial:: nb :: Read < u8 > for Box < dyn SerialPort > {
37+ impl serial:: Read < u8 > for Box < dyn SerialPort > {
3838 fn read ( & mut self ) -> nb:: Result < u8 , Self :: Error > {
3939 let mut buffer = [ 0 ; 1 ] ;
4040 let bytes_read = io:: Read :: read ( self , & mut buffer) . map_err ( io_error_to_nb) ?;
@@ -46,7 +46,7 @@ impl serial::nb::Read<u8> for Box<dyn SerialPort> {
4646 }
4747}
4848
49- impl serial:: nb :: Write < u8 > for Box < dyn SerialPort > {
49+ impl serial:: Write < u8 > for Box < dyn SerialPort > {
5050 fn write ( & mut self , word : u8 ) -> nb:: Result < ( ) , Self :: Error > {
5151 io:: Write :: write ( self , & [ word] )
5252 . map_err ( io_error_to_nb)
You can’t perform that action at this time.
0 commit comments