Skip to content

Commit a1fb241

Browse files
authored
Merge pull request #105 from tommy-gilligan/master
Bump embedded-hal to rc 3
2 parents da2649b + 8b78ad3 commit a1fb241

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

.github/workflows/ci.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ jobs:
3939

4040
- name: Install armv7 libraries
4141
if: ${{ matrix.target == 'armv7-unknown-linux-gnueabihf' }}
42-
run: sudo apt-get install -y libc6-armhf-cross libc6-dev-armhf-cross gcc-arm-linux-gnueabihf
42+
run: |
43+
sudo apt-get update
44+
sudo apt-get install -y libc6-armhf-cross libc6-dev-armhf-cross gcc-arm-linux-gnueabihf
4345
4446
- run: cargo check --target=${{ matrix.target }} --features=${{ matrix.features }}

CHANGELOG.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
88
## [Unreleased]
99

1010
### Changed
11-
- Updated to `embedded-hal` `1.0.0-rc.2` release ([API changes](https://github.com/rust-embedded/embedded-hal/blob/master/embedded-hal/CHANGELOG.md#v100-rc2---2023-11-28))
12-
- Updated to `embedded-hal-nb` `1.0.0-rc.2` release ([API changes](https://github.com/rust-embedded/embedded-hal/blob/master/embedded-hal-nb/CHANGELOG.md#v100-rc2---2023-11-28))
13-
11+
- Updated to `embedded-hal` `1.0.0-rc.3` release ([API changes](https://github.com/rust-embedded/embedded-hal/blob/master/embedded-hal/CHANGELOG.md#v100-rc3---2023-12-14))
12+
- Updated to `embedded-hal-nb` `1.0.0-rc.3` release ([API changes](https://github.com/rust-embedded/embedded-hal/blob/master/embedded-hal-nb/CHANGELOG.md#v100-rc3---2023-12-14))
1413

1514
## [v0.4.0-alpha.4] - 2023-11-10
1615

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ spi = ["spidev"]
2222
default = [ "gpio_cdev", "gpio_sysfs", "i2c", "spi" ]
2323

2424
[dependencies]
25-
embedded-hal = "=1.0.0-rc.2"
26-
embedded-hal-nb = "=1.0.0-rc.2"
25+
embedded-hal = "=1.0.0-rc.3"
26+
embedded-hal-nb = "=1.0.0-rc.3"
2727
gpio-cdev = { version = "0.5.1", optional = true }
2828
sysfs_gpio = { version = "0.6.1", optional = true }
2929
i2cdev = { version = "0.6.0", optional = true }

src/cdev_pin.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ impl embedded_hal::digital::OutputPin for CdevPin {
159159
}
160160

161161
impl embedded_hal::digital::InputPin for CdevPin {
162-
fn is_high(&self) -> Result<bool, Self::Error> {
162+
fn is_high(&mut self) -> Result<bool, Self::Error> {
163163
self.0
164164
.get_value()
165165
.map(|val| {
@@ -171,7 +171,7 @@ impl embedded_hal::digital::InputPin for CdevPin {
171171
.map_err(CdevPinError::from)
172172
}
173173

174-
fn is_low(&self) -> Result<bool, Self::Error> {
174+
fn is_low(&mut self) -> Result<bool, Self::Error> {
175175
self.is_high().map(|val| !val)
176176
}
177177
}

src/sysfs_pin.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ impl embedded_hal::digital::OutputPin for SysfsPin {
108108
}
109109

110110
impl embedded_hal::digital::InputPin for SysfsPin {
111-
fn is_high(&self) -> Result<bool, Self::Error> {
111+
fn is_high(&mut self) -> Result<bool, Self::Error> {
112112
if !self.0.get_active_low().map_err(SysfsPinError::from)? {
113113
self.0
114114
.get_value()
@@ -122,7 +122,7 @@ impl embedded_hal::digital::InputPin for SysfsPin {
122122
}
123123
}
124124

125-
fn is_low(&self) -> Result<bool, Self::Error> {
125+
fn is_low(&mut self) -> Result<bool, Self::Error> {
126126
self.is_high().map(|val| !val).map_err(SysfsPinError::from)
127127
}
128128
}

0 commit comments

Comments
 (0)