Skip to content

Commit 3c272a3

Browse files
Bump embedded-hal to rc 3
1 parent da2649b commit 3c272a3

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

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)