File tree Expand file tree Collapse file tree 4 files changed +21
-15
lines changed Expand file tree Collapse file tree 4 files changed +21
-15
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
7
7
8
8
## [ Unreleased]
9
9
10
+ ## [ v1.0.0-rc.1] - 2023-09-06
11
+
10
12
### Changed
11
13
- [ 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 ) )
14
+ - 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 ) )
15
+ - 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 ) )
16
+ - Updated to ` spidev ` ` 0.6.0 ` release([ API changes] ( https://github.com/rust-embedded/rust-spidev/blob/master/CHANGELOG.md#060--2023-08-03 ) )
17
+ - Updated to ` i2cdev ` ` 0.6.0 ` release([ API changes] ( https://github.com/rust-embedded/rust-i2cdev/blob/master/CHANGELOG.md#v060---2023-08-03 ) )
18
+ - Updated to ` nix ` ` 0.26 ` to match ` i2cdev `
14
19
15
20
### Fixed
16
21
- Fix using SPI transfer with unequal buffer sizes (#97 , #98 ).
@@ -138,7 +143,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
138
143
139
144
Initial release
140
145
141
- [ Unreleased ] : https://github.com/rust-embedded/linux-embedded-hal/compare/v0.4.0-alpha.3...HEAD
146
+ [ Unreleased ] : https://github.com/rust-embedded/linux-embedded-hal/compare/v1.0.0-rc.1...HEAD
147
+ [ v1.0.0-rc.1 ] : https://github.com/rust-embedded/linux-embedded-hal/compare/v0.4.0-alpha.3...v1.0.0-rc.1
142
148
[ v0.4.0-alpha.3 ] : https://github.com/rust-embedded/linux-embedded-hal/compare/v0.4.0-alpha.2...v0.4.0-alpha.3
143
149
[ v0.4.0-alpha.2 ] : https://github.com/rust-embedded/linux-embedded-hal/compare/v0.4.0-alpha.1...v0.4.0-alpha.2
144
150
[ v0.4.0-alpha.1 ] : https://github.com/rust-embedded/linux-embedded-hal/compare/v0.3.0...v0.4.0-alpha.1
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ keywords = ["Linux", "hal"]
9
9
license = " MIT OR Apache-2.0"
10
10
name = " linux-embedded-hal"
11
11
repository = " https://github.com/rust-embedded/linux-embedded-hal"
12
- version = " 0.4.0-alpha.3 "
12
+ version = " 1.0.0-rc.1 "
13
13
edition = " 2018"
14
14
15
15
[features ]
@@ -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