File tree 4 files changed +16
-13
lines changed
4 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
9
9
10
10
### Changed
11
11
- [ breaking-change] Replace serial-rs with the serialport-rs crate. ` Serial::open ` now needs a baud-rate argument as well.
12
- - Updated to ` embedded-hal ` ` 1.0.0-alpha.11 ` release ([ API changes] ( https://github.com/rust-embedded/embedded-hal/blob/master/embedded-hal/CHANGELOG.md#v100-alpha11---2023-07-04 ) )
13
- - Updated to ` spidev ` ` 0.5.2 ` release([ API changes] ( https://github.com/rust-embedded/rust-spidev/blob/master/CHANGELOG.md#052--2023-08-02 ) )
12
+ - Updated to ` embedded-hal ` ` 1.0.0-rc.1 ` release ([ API changes] ( https://github.com/rust-embedded/embedded-hal/blob/master/embedded-hal/CHANGELOG.md#v100-rc1---2023-08-15 ) )
13
+ - Updated to ` embedded-hal-nb ` ` 1.0.0-rc.1 ` release ([ API changes] ( https://github.com/rust-embedded/embedded-hal/blob/master/embedded-hal-nb/CHANGELOG.md#v100-rc1---2023-08-15 ) )
14
+ - Updated to ` spidev ` ` 0.6.0 ` release([ API changes] ( https://github.com/rust-embedded/rust-spidev/blob/master/CHANGELOG.md#060--2023-08-03 ) )
15
+ - Updated to ` i2cdev ` ` 0.6.0 ` release([ API changes] ( https://github.com/rust-embedded/rust-i2cdev/blob/master/CHANGELOG.md#v060---2023-08-03 ) )
16
+ - Updated to ` nix ` ` 0.26 ` to match ` i2cdev `
14
17
15
18
### Fixed
16
19
- Fix using SPI transfer with unequal buffer sizes (#97 , #98 ).
Original file line number Diff line number Diff line change @@ -22,15 +22,15 @@ spi = ["spidev"]
22
22
default = [ " gpio_cdev" , " gpio_sysfs" , " i2c" , " spi" ]
23
23
24
24
[dependencies ]
25
- embedded-hal = " =1.0.0-alpha.11 "
26
- embedded-hal-nb = " =1.0.0-alpha.3 "
25
+ embedded-hal = " =1.0.0-rc.1 "
26
+ embedded-hal-nb = " =1.0.0-rc.1 "
27
27
gpio-cdev = { version = " 0.5.1" , optional = true }
28
28
sysfs_gpio = { version = " 0.6.1" , optional = true }
29
- i2cdev = { version = " 0.5.1 " , optional = true }
29
+ i2cdev = { version = " 0.6.0 " , optional = true }
30
30
nb = " 1"
31
31
serialport = { version = " 4.2.0" , default-features = false }
32
- spidev = { version = " 0.5.2 " , optional = true }
33
- nix = " 0.23.1 "
32
+ spidev = { version = " 0.6.0 " , optional = true }
33
+ nix = " 0.26.2 "
34
34
35
35
[dev-dependencies ]
36
36
openpty = " 0.2.0"
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ impl embedded_hal::i2c::Error for I2CError {
138
138
use nix:: errno:: Errno :: * ;
139
139
140
140
let errno = match & self . err {
141
- i2cdev:: linux:: LinuxI2CError :: Nix ( e) => * e ,
141
+ i2cdev:: linux:: LinuxI2CError :: Errno ( e) => nix :: Error :: from_i32 ( * e ) ,
142
142
i2cdev:: linux:: LinuxI2CError :: Io ( e) => match e. raw_os_error ( ) {
143
143
Some ( r) => nix:: Error :: from_i32 ( r) ,
144
144
None => return ErrorKind :: Other ,
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ fn translate_io_errors(err: std::io::Error) -> nb::Error<SerialError> {
32
32
}
33
33
}
34
34
35
- impl embedded_hal :: serial:: ErrorType for Serial {
35
+ impl embedded_hal_nb :: serial:: ErrorType for Serial {
36
36
type Error = SerialError ;
37
37
}
38
38
@@ -80,10 +80,10 @@ impl fmt::Display for SerialError {
80
80
81
81
impl std:: error:: Error for SerialError { }
82
82
83
- impl embedded_hal :: serial:: Error for SerialError {
83
+ impl embedded_hal_nb :: serial:: Error for SerialError {
84
84
#[ allow( clippy:: match_single_binding) ]
85
- fn kind ( & self ) -> embedded_hal :: serial:: ErrorKind {
86
- use embedded_hal :: serial:: ErrorKind :: * ;
85
+ fn kind ( & self ) -> embedded_hal_nb :: serial:: ErrorKind {
86
+ use embedded_hal_nb :: serial:: ErrorKind :: * ;
87
87
// TODO: match any errors here if we can find any that are relevant
88
88
Other
89
89
}
@@ -120,7 +120,7 @@ mod test {
120
120
#[ test]
121
121
fn test_read ( ) {
122
122
let ( mut master, mut serial) = create_pty_and_serial ( ) ;
123
- master. write ( & [ 1 ] ) . expect ( "Write failed" ) ;
123
+ master. write_all ( & [ 1 ] ) . expect ( "Write failed" ) ;
124
124
assert_eq ! ( Ok ( 1 ) , serial. read( ) ) ;
125
125
}
126
126
You can’t perform that action at this time.
0 commit comments