Skip to content

Commit

Permalink
Merge pull request #715 from rursprung/update-to-embedded-hal-1.0.0-rc.3
Browse files Browse the repository at this point in the history
update to `embedded-hal=1.0.0-rc.3`
  • Loading branch information
burrbull authored Dec 18, 2023
2 parents 83acfd1 + 54d6c52 commit 2139041
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 30 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Changed

- bump embedded-hal to `1.0.0-rc.3`

## [v0.19.0] - 2023-12-11

### Added
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ embedded-dma = "0.2.0"
bare-metal = { version = "1" }
void = { default-features = false, version = "1.0.2" }
embedded-hal = { features = ["unproven"], version = "0.2.7" }
embedded-hal-nb = "1.0.0-rc.1"
embedded-hal-nb = "=1.0.0-rc.3"
display-interface = { version = "0.4.1", optional = true }
fugit = "0.3.7"
fugit-timer = "0.1.3"
Expand All @@ -55,7 +55,7 @@ version = "0.3.14"
default-features = false

[dependencies.embedded-hal-one]
version = "=1.0.0-rc.2"
version = "=1.0.0-rc.3"
package = "embedded-hal"

[dependencies.stm32_i2s_v12x]
Expand Down
56 changes: 28 additions & 28 deletions src/gpio/hal_1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ impl<const P: char, const N: u8, MODE> OutputPin for Pin<P, N, Output<MODE>> {

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

#[inline(always)]
fn is_set_low(&self) -> Result<bool, Self::Error> {
Ok(self.is_set_low())
fn is_set_low(&mut self) -> Result<bool, Self::Error> {
Ok(Pin::is_set_low(self))
}
}

Expand All @@ -52,13 +52,13 @@ where
MODE: marker::Readable,
{
#[inline(always)]
fn is_high(&self) -> Result<bool, Self::Error> {
Ok(self.is_high())
fn is_high(&mut self) -> Result<bool, Self::Error> {
Ok(Pin::is_high(self))
}

#[inline(always)]
fn is_low(&self) -> Result<bool, Self::Error> {
Ok(self.is_low())
fn is_low(&mut self) -> Result<bool, Self::Error> {
Ok(Pin::is_low(self))
}
}

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

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

#[inline(always)]
fn is_set_low(&self) -> Result<bool, Self::Error> {
Ok(self.is_set_low())
fn is_set_low(&mut self) -> Result<bool, Self::Error> {
Ok(ErasedPin::is_set_low(self))
}
}

Expand All @@ -106,13 +106,13 @@ where
MODE: marker::Readable,
{
#[inline(always)]
fn is_high(&self) -> Result<bool, Self::Error> {
Ok(self.is_high())
fn is_high(&mut self) -> Result<bool, Self::Error> {
Ok(ErasedPin::is_high(self))
}

#[inline(always)]
fn is_low(&self) -> Result<bool, Self::Error> {
Ok(self.is_low())
fn is_low(&mut self) -> Result<bool, Self::Error> {
Ok(ErasedPin::is_low(self))
}
}

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

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

#[inline(always)]
fn is_set_low(&self) -> Result<bool, Self::Error> {
Ok(self.is_set_low())
fn is_set_low(&mut self) -> Result<bool, Self::Error> {
Ok(PartiallyErasedPin::is_set_low(self))
}
}

Expand All @@ -160,13 +160,13 @@ where
MODE: marker::Readable,
{
#[inline(always)]
fn is_high(&self) -> Result<bool, Self::Error> {
Ok(self.is_high())
fn is_high(&mut self) -> Result<bool, Self::Error> {
Ok(PartiallyErasedPin::is_high(self))
}

#[inline(always)]
fn is_low(&self) -> Result<bool, Self::Error> {
Ok(self.is_low())
fn is_low(&mut self) -> Result<bool, Self::Error> {
Ok(PartiallyErasedPin::is_low(self))
}
}

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

impl<const P: char, const N: u8> InputPin for DynamicPin<P, N> {
fn is_high(&self) -> Result<bool, Self::Error> {
self.is_high()
fn is_high(&mut self) -> Result<bool, Self::Error> {
DynamicPin::is_high(self)
}
fn is_low(&self) -> Result<bool, Self::Error> {
self.is_low()
fn is_low(&mut self) -> Result<bool, Self::Error> {
DynamicPin::is_low(self)
}
}

0 comments on commit 2139041

Please sign in to comment.