Skip to content

Commit 2139041

Browse files
authored
Merge pull request #715 from rursprung/update-to-embedded-hal-1.0.0-rc.3
update to `embedded-hal=1.0.0-rc.3`
2 parents 83acfd1 + 54d6c52 commit 2139041

File tree

3 files changed

+34
-30
lines changed

3 files changed

+34
-30
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- bump embedded-hal to `1.0.0-rc.3`
13+
1014
## [v0.19.0] - 2023-12-11
1115

1216
### Added

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ embedded-dma = "0.2.0"
4040
bare-metal = { version = "1" }
4141
void = { default-features = false, version = "1.0.2" }
4242
embedded-hal = { features = ["unproven"], version = "0.2.7" }
43-
embedded-hal-nb = "1.0.0-rc.1"
43+
embedded-hal-nb = "=1.0.0-rc.3"
4444
display-interface = { version = "0.4.1", optional = true }
4545
fugit = "0.3.7"
4646
fugit-timer = "0.1.3"
@@ -55,7 +55,7 @@ version = "0.3.14"
5555
default-features = false
5656

5757
[dependencies.embedded-hal-one]
58-
version = "=1.0.0-rc.2"
58+
version = "=1.0.0-rc.3"
5959
package = "embedded-hal"
6060

6161
[dependencies.stm32_i2s_v12x]

src/gpio/hal_1.rs

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ impl<const P: char, const N: u8, MODE> OutputPin for Pin<P, N, Output<MODE>> {
2929

3030
impl<const P: char, const N: u8, MODE> StatefulOutputPin for Pin<P, N, Output<MODE>> {
3131
#[inline(always)]
32-
fn is_set_high(&self) -> Result<bool, Self::Error> {
33-
Ok(self.is_set_high())
32+
fn is_set_high(&mut self) -> Result<bool, Self::Error> {
33+
Ok(Pin::is_set_high(self))
3434
}
3535

3636
#[inline(always)]
37-
fn is_set_low(&self) -> Result<bool, Self::Error> {
38-
Ok(self.is_set_low())
37+
fn is_set_low(&mut self) -> Result<bool, Self::Error> {
38+
Ok(Pin::is_set_low(self))
3939
}
4040
}
4141

@@ -52,13 +52,13 @@ where
5252
MODE: marker::Readable,
5353
{
5454
#[inline(always)]
55-
fn is_high(&self) -> Result<bool, Self::Error> {
56-
Ok(self.is_high())
55+
fn is_high(&mut self) -> Result<bool, Self::Error> {
56+
Ok(Pin::is_high(self))
5757
}
5858

5959
#[inline(always)]
60-
fn is_low(&self) -> Result<bool, Self::Error> {
61-
Ok(self.is_low())
60+
fn is_low(&mut self) -> Result<bool, Self::Error> {
61+
Ok(Pin::is_low(self))
6262
}
6363
}
6464

@@ -83,13 +83,13 @@ impl<MODE> OutputPin for ErasedPin<Output<MODE>> {
8383

8484
impl<MODE> StatefulOutputPin for ErasedPin<Output<MODE>> {
8585
#[inline(always)]
86-
fn is_set_high(&self) -> Result<bool, Self::Error> {
87-
Ok(self.is_set_high())
86+
fn is_set_high(&mut self) -> Result<bool, Self::Error> {
87+
Ok(ErasedPin::is_set_high(self))
8888
}
8989

9090
#[inline(always)]
91-
fn is_set_low(&self) -> Result<bool, Self::Error> {
92-
Ok(self.is_set_low())
91+
fn is_set_low(&mut self) -> Result<bool, Self::Error> {
92+
Ok(ErasedPin::is_set_low(self))
9393
}
9494
}
9595

@@ -106,13 +106,13 @@ where
106106
MODE: marker::Readable,
107107
{
108108
#[inline(always)]
109-
fn is_high(&self) -> Result<bool, Self::Error> {
110-
Ok(self.is_high())
109+
fn is_high(&mut self) -> Result<bool, Self::Error> {
110+
Ok(ErasedPin::is_high(self))
111111
}
112112

113113
#[inline(always)]
114-
fn is_low(&self) -> Result<bool, Self::Error> {
115-
Ok(self.is_low())
114+
fn is_low(&mut self) -> Result<bool, Self::Error> {
115+
Ok(ErasedPin::is_low(self))
116116
}
117117
}
118118

@@ -137,13 +137,13 @@ impl<const P: char, MODE> OutputPin for PartiallyErasedPin<P, Output<MODE>> {
137137

138138
impl<const P: char, MODE> StatefulOutputPin for PartiallyErasedPin<P, Output<MODE>> {
139139
#[inline(always)]
140-
fn is_set_high(&self) -> Result<bool, Self::Error> {
141-
Ok(self.is_set_high())
140+
fn is_set_high(&mut self) -> Result<bool, Self::Error> {
141+
Ok(PartiallyErasedPin::is_set_high(self))
142142
}
143143

144144
#[inline(always)]
145-
fn is_set_low(&self) -> Result<bool, Self::Error> {
146-
Ok(self.is_set_low())
145+
fn is_set_low(&mut self) -> Result<bool, Self::Error> {
146+
Ok(PartiallyErasedPin::is_set_low(self))
147147
}
148148
}
149149

@@ -160,13 +160,13 @@ where
160160
MODE: marker::Readable,
161161
{
162162
#[inline(always)]
163-
fn is_high(&self) -> Result<bool, Self::Error> {
164-
Ok(self.is_high())
163+
fn is_high(&mut self) -> Result<bool, Self::Error> {
164+
Ok(PartiallyErasedPin::is_high(self))
165165
}
166166

167167
#[inline(always)]
168-
fn is_low(&self) -> Result<bool, Self::Error> {
169-
Ok(self.is_low())
168+
fn is_low(&mut self) -> Result<bool, Self::Error> {
169+
Ok(PartiallyErasedPin::is_low(self))
170170
}
171171
}
172172

@@ -185,10 +185,10 @@ impl<const P: char, const N: u8> OutputPin for DynamicPin<P, N> {
185185
}
186186

187187
impl<const P: char, const N: u8> InputPin for DynamicPin<P, N> {
188-
fn is_high(&self) -> Result<bool, Self::Error> {
189-
self.is_high()
188+
fn is_high(&mut self) -> Result<bool, Self::Error> {
189+
DynamicPin::is_high(self)
190190
}
191-
fn is_low(&self) -> Result<bool, Self::Error> {
192-
self.is_low()
191+
fn is_low(&mut self) -> Result<bool, Self::Error> {
192+
DynamicPin::is_low(self)
193193
}
194194
}

0 commit comments

Comments
 (0)