Update to 1.0.0 releases of embedded-hal-* packages (#1068)

* Update to `1.0.0` releases of `embedded-hal-*` packages

* Update `CHANGELOG.md`
This commit is contained in:
Jesse Braham 2024-01-11 14:33:23 +00:00 committed by GitHub
parent c53f3095ec
commit 63408cf8a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 103 additions and 78 deletions

View File

@ -19,6 +19,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Update to `1.0.0` releases of the `embedded-hal-*` packages (#1068)
### Fixed
- ESP32: correct gpio 32/33 in errata36() (#1053)
@ -26,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Removed
### Breaking
- Unify the low-power peripheral names (`RTC_CNTL` and `LP_CLKRST` to `LPWR`) (#1064)
## [0.14.1] - 2023-12-13

View File

@ -23,8 +23,8 @@ defmt = { version = "=0.3.5", optional = true }
embedded-can = { version = "0.4.1", optional = true }
embedded-dma = "0.2.0"
embedded-hal = { version = "0.2.7", features = ["unproven"] }
embedded-hal-1 = { version = "=1.0.0-rc.2", optional = true, package = "embedded-hal" }
embedded-hal-nb = { version = "=1.0.0-rc.2", optional = true }
embedded-hal-1 = { version = "1.0.0", optional = true, package = "embedded-hal" }
embedded-hal-nb = { version = "1.0.0", optional = true }
embedded-io = { version = "0.6.1", optional = true }
enumset = "1.1.3"
esp-synopsys-usb-otg = { version = "0.4.0", optional = true, features = ["fs", "esp32sx"] }
@ -40,7 +40,7 @@ void = { version = "1.0.2", default-features = false }
usb-device = { version = "0.3.1", optional = true }
# async
embedded-hal-async = { version = "=1.0.0-rc.2", optional = true }
embedded-hal-async = { version = "1.0.0", optional = true }
embedded-io-async = { version = "0.6.1", optional = true }
embassy-executor = { version = "0.4.0", optional = true }
embassy-futures = { version = "0.1.1", optional = true }
@ -185,3 +185,9 @@ defmt = [
"embedded-io/defmt-03",
"embedded-io-async?/defmt-03",
]
[patch.crates-io]
embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }
embassy-futures = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }
embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }
embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }

View File

@ -569,10 +569,10 @@ impl<MODE, const GPIONUM: u8> embedded_hal_1::digital::InputPin for GpioPin<Inpu
where
Self: GpioProperties,
{
fn is_high(&self) -> Result<bool, Self::Error> {
fn is_high(&mut self) -> Result<bool, Self::Error> {
Ok(<Self as GpioProperties>::Bank::read_input() & (1 << (GPIONUM % 32)) != 0)
}
fn is_low(&self) -> Result<bool, Self::Error> {
fn is_low(&mut self) -> Result<bool, Self::Error> {
Ok(!self.is_high()?)
}
}
@ -583,10 +583,10 @@ where
Self: GpioProperties,
<Self as GpioProperties>::PinType: IsOutputPin,
{
fn is_high(&self) -> Result<bool, Self::Error> {
fn is_high(&mut self) -> Result<bool, Self::Error> {
Ok(<Self as GpioProperties>::Bank::read_input() & (1 << (GPIONUM % 32)) != 0)
}
fn is_low(&self) -> Result<bool, Self::Error> {
fn is_low(&mut self) -> Result<bool, Self::Error> {
Ok(!self.is_high()?)
}
}
@ -918,31 +918,14 @@ where
Self: GpioProperties,
<Self as GpioProperties>::PinType: IsOutputPin,
{
fn is_set_high(&self) -> Result<bool, Self::Error> {
fn is_set_high(&mut self) -> Result<bool, Self::Error> {
Ok(<Self as GpioProperties>::Bank::read_output() & (1 << (GPIONUM % 32)) != 0)
}
fn is_set_low(&self) -> Result<bool, Self::Error> {
fn is_set_low(&mut self) -> Result<bool, Self::Error> {
Ok(!self.is_set_high()?)
}
}
#[cfg(feature = "eh1")]
impl<MODE, const GPIONUM: u8> embedded_hal_1::digital::ToggleableOutputPin
for GpioPin<Output<MODE>, GPIONUM>
where
Self: GpioProperties,
<Self as GpioProperties>::PinType: IsOutputPin,
{
fn toggle(&mut self) -> Result<(), Self::Error> {
use embedded_hal_1::digital::{OutputPin as _, StatefulOutputPin as _};
if self.is_set_high()? {
Ok(self.set_low()?)
} else {
Ok(self.set_high()?)
}
}
}
impl<MODE, const GPIONUM: u8> crate::peripheral::Peripheral for GpioPin<MODE, GPIONUM>
where
Self: GpioProperties,
@ -1376,13 +1359,13 @@ impl<MODE> embedded_hal_1::digital::ErrorType for AnyPin<Input<MODE>> {
#[cfg(feature = "eh1")]
impl<MODE> embedded_hal_1::digital::InputPin for AnyPin<Input<MODE>> {
fn is_high(&self) -> Result<bool, Self::Error> {
let inner = &self.inner;
fn is_high(&mut self) -> Result<bool, Self::Error> {
let inner = &mut self.inner;
handle_gpio_input!(inner, target, { target.is_high() })
}
fn is_low(&self) -> Result<bool, Self::Error> {
let inner = &self.inner;
fn is_low(&mut self) -> Result<bool, Self::Error> {
let inner = &mut self.inner;
handle_gpio_input!(inner, target, { target.is_low() })
}
}
@ -1442,22 +1425,14 @@ impl<MODE> embedded_hal_1::digital::OutputPin for AnyPin<Output<MODE>> {
#[cfg(feature = "eh1")]
impl<MODE> embedded_hal_1::digital::StatefulOutputPin for AnyPin<Output<MODE>> {
fn is_set_high(&self) -> Result<bool, Self::Error> {
let inner = &self.inner;
fn is_set_high(&mut self) -> Result<bool, Self::Error> {
let inner = &mut self.inner;
handle_gpio_output!(inner, target, { target.is_set_high() })
}
fn is_set_low(&self) -> Result<bool, Self::Error> {
let inner = &self.inner;
handle_gpio_output!(inner, target, { target.is_set_low() })
}
}
#[cfg(feature = "eh1")]
impl<MODE> embedded_hal_1::digital::ToggleableOutputPin for AnyPin<Output<MODE>> {
fn toggle(&mut self) -> Result<(), Self::Error> {
fn is_set_low(&mut self) -> Result<bool, Self::Error> {
let inner = &mut self.inner;
handle_gpio_output!(inner, target, { target.toggle() })
handle_gpio_output!(inner, target, { target.is_set_low() })
}
}

View File

@ -12,7 +12,7 @@ features = ["esp32c3"]
[dependencies]
defmt = { version = "=0.3.5", optional = true }
esp-hal-common = { version = "0.14.0", path = "../esp-hal-common" }
esp-hal-common = { version = "0.14.1", path = "../esp-hal-common" }
fugit = "0.3.7"
smart-leds-trait = "0.2.1"
@ -28,3 +28,9 @@ xtal-26mhz = ["esp-hal-common/xtal-26mhz"]
xtal-40mhz = ["esp-hal-common/xtal-40mhz"]
defmt = ["dep:defmt", "esp-hal-common/defmt"]
[patch.crates-io]
embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }
embassy-futures = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }
embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }
embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }

View File

@ -31,14 +31,14 @@ crypto-bigint = { version = "0.5.5", default-features = false }
embassy-executor = { version = "0.4.0", features = ["nightly"] }
embassy-sync = "0.5.0"
embedded-graphics = "0.8.1"
embedded-hal-1 = { version = "=1.0.0-rc.2", package = "embedded-hal" }
embedded-hal-async = "=1.0.0-rc.2"
embedded-hal-1 = { version = "1.0.0", package = "embedded-hal" }
embedded-hal-async = "1.0.0"
embedded-io-async = "0.6.1"
embedded-hal-bus = "0.1.0-rc.2"
esp-alloc = "0.3.0"
esp-backtrace = { version = "0.9.0", features = ["esp32", "panic-handler", "exception-handler", "print-uart"] }
esp-backtrace = { version = "0.10.0", features = ["esp32", "panic-handler", "exception-handler", "print-uart"] }
esp-hal-smartled = { version = "0.7.0", features = ["esp32"], path = "../esp-hal-smartled" }
esp-println = { version = "0.7.1", features = ["esp32"] }
esp-println = { version = "0.8.0", features = ["esp32"] }
heapless = "0.8.0"
lis3dh-async = "0.8.0"
sha2 = { version = "0.10.8", default-features = false}
@ -51,7 +51,7 @@ default = ["rt", "vectored", "xtal-40mhz", "embassy-integrated-timers"]
async = ["esp-hal-common/async"]
bluetooth = []
debug = ["esp-hal-common/debug"]
defmt = ["esp-hal-common/defmt", "esp-println/defmt"]
defmt = ["esp-hal-common/defmt", "esp-println/defmt-espflash"]
eh1 = ["esp-hal-common/eh1"]
embedded-io = ["esp-hal-common/embedded-io"]
log = ["esp-hal-common/log", "esp-println/log"]
@ -143,3 +143,8 @@ required-features = ["embassy", "async"]
[[example]]
name = "embassy_i2s_read"
required-features = ["embassy", "async"]
[patch.crates-io]
embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }
embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }
embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }

View File

@ -31,12 +31,12 @@ elliptic-curve = { version = "0.13.8", default-features = false, features =
embassy-executor = { version = "0.4.0", features = ["nightly"] }
embassy-sync = "0.5.0"
embedded-graphics = "0.8.1"
embedded-hal-1 = { version = "=1.0.0-rc.2", package = "embedded-hal" }
embedded-hal-async = "=1.0.0-rc.2"
embedded-hal-1 = { version = "1.0.0", package = "embedded-hal" }
embedded-hal-async = "1.0.0"
embedded-io-async = "0.6.1"
embedded-hal-bus = "0.1.0-rc.2"
esp-backtrace = { version = "0.9.0", features = ["esp32c2", "panic-handler", "exception-handler", "print-uart"] }
esp-println = { version = "0.7.1", features = ["esp32c2"] }
esp-backtrace = { version = "0.10.0", features = ["esp32c2", "panic-handler", "exception-handler", "print-uart"] }
esp-println = { version = "0.8.0", features = ["esp32c2"] }
heapless = "0.8.0"
hex-literal = "0.4.1"
lis3dh-async = "0.8.0"
@ -50,7 +50,7 @@ static_cell = { version = "2.0.0", features = ["nightly"] }
default = ["rt", "vectored", "xtal-40mhz", "embassy-integrated-timers"]
async = ["esp-hal-common/async"]
debug = ["esp-hal-common/debug"]
defmt = ["esp-hal-common/defmt", "esp-println/defmt"]
defmt = ["esp-hal-common/defmt", "esp-println/defmt-espflash"]
direct-vectoring = ["esp-hal-common/direct-vectoring"]
eh1 = ["esp-hal-common/eh1"]
embedded-io = ["esp-hal-common/embedded-io"]
@ -119,3 +119,8 @@ required-features = ["embassy", "async", "embassy-executor-thread"]
[[example]]
name = "direct-vectoring"
required-features = ["direct-vectoring"]
[patch.crates-io]
embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }
embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }
embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }

View File

@ -34,13 +34,13 @@ embassy-sync = "0.5.0"
embedded-can = "0.4.1"
embedded-graphics = "0.8.1"
embedded-hal = { version = "0.2.7", features = ["unproven"] }
embedded-hal-1 = { version = "=1.0.0-rc.2", package = "embedded-hal" }
embedded-hal-async = "=1.0.0-rc.2"
embedded-hal-1 = { version = "1.0.0", package = "embedded-hal" }
embedded-hal-async = "1.0.0"
embedded-io-async = "0.6.1"
embedded-hal-bus = "0.1.0-rc.2"
esp-backtrace = { version = "0.9.0", features = ["esp32c3", "panic-handler", "exception-handler", "print-uart"] }
esp-backtrace = { version = "0.10.0", features = ["esp32c3", "panic-handler", "exception-handler", "print-uart"] }
esp-hal-smartled = { version = "0.7.0", features = ["esp32c3"], path = "../esp-hal-smartled" }
esp-println = { version = "0.7.1", features = ["esp32c3"] }
esp-println = { version = "0.8.0", features = ["esp32c3"] }
heapless = "0.8.0"
hmac = { version = "0.12.1", default-features = false }
lis3dh-async = "0.8.0"
@ -53,7 +53,7 @@ static_cell = { version = "2.0.0", features = ["nightly"] }
default = ["rt", "vectored", "zero-rtc-bss", "embassy-integrated-timers"]
async = ["esp-hal-common/async"]
debug = ["esp-hal-common/debug"]
defmt = ["esp-hal-common/defmt", "esp-println/defmt"]
defmt = ["esp-hal-common/defmt", "esp-println/defmt-espflash"]
direct-vectoring = ["esp-hal-common/direct-vectoring"]
eh1 = ["esp-hal-common/eh1"]
embedded-io = ["esp-hal-common/embedded-io"]
@ -145,3 +145,8 @@ required-features = ["embassy", "async", "embassy-executor-thread"]
[[example]]
name = "direct-vectoring"
required-features = ["direct-vectoring"]
[patch.crates-io]
embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }
embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }
embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }

View File

@ -32,14 +32,14 @@ elliptic-curve = { version = "0.13.8", default-features = false, features =
embassy-executor = { version = "0.4.0", features = ["nightly"] }
embassy-sync = "0.5.0"
embedded-graphics = "0.8.1"
embedded-hal-1 = { version = "=1.0.0-rc.2", package = "embedded-hal" }
embedded-hal-async = "=1.0.0-rc.2"
embedded-hal-1 = { version = "1.0.0", package = "embedded-hal" }
embedded-hal-async = "1.0.0"
embedded-can = "0.4.1"
embedded-io-async = "0.6.1"
embedded-hal-bus = "0.1.0-rc.2"
esp-backtrace = { version = "0.9.0", features = ["esp32c6", "panic-handler", "exception-handler", "print-uart"] }
esp-backtrace = { version = "0.10.0", features = ["esp32c6", "panic-handler", "exception-handler", "print-uart"] }
esp-hal-smartled = { version = "0.7.0", features = ["esp32c6"], path = "../esp-hal-smartled" }
esp-println = { version = "0.7.1", features = ["esp32c6"] }
esp-println = { version = "0.8.0", features = ["esp32c6"] }
heapless = "0.8.0"
hex-literal = "0.4.1"
hmac = { version = "0.12.1", default-features = false }
@ -55,7 +55,7 @@ static_cell = { version = "2.0.0", features = ["nightly"] }
default = ["rt", "vectored", "zero-rtc-bss", "embassy-integrated-timers"]
async = ["esp-hal-common/async"]
debug = ["esp-hal-common/debug"]
defmt = ["esp-hal-common/defmt", "esp-println/defmt"]
defmt = ["esp-hal-common/defmt", "esp-println/defmt-espflash"]
direct-vectoring = ["esp-hal-common/direct-vectoring"]
eh1 = ["esp-hal-common/eh1"]
embedded-io = ["esp-hal-common/embedded-io"]
@ -156,3 +156,8 @@ required-features = ["embassy", "async", "embassy-executor-thread"]
[[example]]
name = "embassy_usb_serial_jtag"
required-features = ["embassy", "async", "embassy-executor-thread"]
[patch.crates-io]
embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }
embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }
embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }

View File

@ -32,14 +32,14 @@ elliptic-curve = { version = "0.13.8", default-features = false, features =
embassy-executor = { version = "0.4.0", features = ["nightly"] }
embassy-sync = "0.5.0"
embedded-graphics = "0.8.1"
embedded-hal-1 = { version = "=1.0.0-rc.2", package = "embedded-hal" }
embedded-hal-async = "=1.0.0-rc.2"
embedded-hal-1 = { version = "1.0.0", package = "embedded-hal" }
embedded-hal-async = "1.0.0"
embedded-can = "0.4.1"
embedded-io-async = "0.6.1"
embedded-hal-bus = "0.1.0-rc.2"
esp-backtrace = { version = "0.9.0", features = ["esp32h2", "panic-handler", "exception-handler", "print-uart"] }
esp-backtrace = { version = "0.10.0", features = ["esp32h2", "panic-handler", "exception-handler", "print-uart"] }
esp-hal-smartled = { version = "0.7.0", features = ["esp32h2"], path = "../esp-hal-smartled" }
esp-println = { version = "0.7.1", features = ["esp32h2"] }
esp-println = { version = "0.8.0", features = ["esp32h2"] }
heapless = "0.8.0"
hex-literal = "0.4.1"
hmac = { version = "0.12.1", default-features = false }
@ -55,7 +55,7 @@ static_cell = { version = "2.0.0", features = ["nightly"] }
default = ["rt", "vectored", "zero-rtc-bss", "embassy-integrated-timers"]
async = ["esp-hal-common/async"]
debug = ["esp-hal-common/debug"]
defmt = ["esp-hal-common/defmt", "esp-println/defmt"]
defmt = ["esp-hal-common/defmt", "esp-println/defmt-espflash"]
direct-vectoring = ["esp-hal-common/direct-vectoring"]
eh1 = ["esp-hal-common/eh1"]
embedded-io = ["esp-hal-common/embedded-io"]
@ -156,3 +156,8 @@ required-features = ["embassy", "async", "embassy-executor-thread"]
[[example]]
name = "embassy_usb_serial_jtag"
required-features = ["embassy", "async", "embassy-executor-thread"]
[patch.crates-io]
embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }
embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }
embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }

View File

@ -31,14 +31,14 @@ crypto-bigint = { version = "0.5.5", default-features = false }
embassy-executor = { version = "0.4.0", features = ["nightly"] }
embassy-sync = "0.5.0"
embedded-graphics = "0.8.1"
embedded-hal-1 = { version = "=1.0.0-rc.2", package = "embedded-hal" }
embedded-hal-async = "=1.0.0-rc.2"
embedded-hal-1 = { version = "1.0.0", package = "embedded-hal" }
embedded-hal-async = "1.0.0"
embedded-io-async = "0.6.1"
embedded-hal-bus = "0.1.0-rc.2"
esp-alloc = "0.3.0"
esp-backtrace = { version = "0.9.0", features = ["esp32s2", "panic-handler", "print-uart", "exception-handler"] }
esp-backtrace = { version = "0.10.0", features = ["esp32s2", "panic-handler", "print-uart", "exception-handler"] }
esp-hal-smartled = { version = "0.7.0", features = ["esp32s2"], path = "../esp-hal-smartled" }
esp-println = { version = "0.7.1", features = ["esp32s2"] }
esp-println = { version = "0.8.0", features = ["esp32s2"] }
# Xtensa targets are not auto detected to need atomic emulation in the futures-* crates.
# As for how to remove this dep for good, see: https://github.com/rust-lang/futures-rs/pull/2805
futures-util = { version = "0.3.17", default-features = false, features = ["portable-atomic"] }
@ -56,7 +56,7 @@ usbd-serial = "0.2.0"
default = ["rt", "vectored", "embassy-integrated-timers"]
async = ["esp-hal-common/async"]
debug = ["esp-hal-common/debug"]
defmt = ["esp-hal-common/defmt", "esp-println/defmt"]
defmt = ["esp-hal-common/defmt", "esp-println/defmt-espflash"]
eh1 = ["esp-hal-common/eh1"]
embedded-io = ["esp-hal-common/embedded-io"]
log = ["esp-hal-common/log", "esp-println/log"]
@ -139,3 +139,8 @@ required-features = ["embassy", "async"]
[[example]]
name = "embassy_i2s_read"
required-features = ["embassy", "async"]
[patch.crates-io]
embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }
embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }
embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }

View File

@ -33,15 +33,15 @@ embassy-executor = { version = "0.4.0", features = ["nightly"] }
embassy-sync = "0.5.0"
embedded-graphics = "0.8.1"
embedded-hal = { version = "0.2.7", features = ["unproven"] }
embedded-hal-1 = { version = "=1.0.0-rc.2", package = "embedded-hal" }
embedded-hal-async = "=1.0.0-rc.2"
embedded-hal-1 = { version = "1.0.0", package = "embedded-hal" }
embedded-hal-async = "1.0.0"
embedded-can = "0.4.1"
embedded-io-async = "0.6.1"
embedded-hal-bus = "0.1.0-rc.2"
esp-alloc = "0.3.0"
esp-backtrace = { version = "0.9.0", features = ["esp32s3", "panic-handler", "exception-handler", "print-uart"] }
esp-backtrace = { version = "0.10.0", features = ["esp32s3", "panic-handler", "exception-handler", "print-uart"] }
esp-hal-smartled = { version = "0.7.0", features = ["esp32s3"], path = "../esp-hal-smartled" }
esp-println = { version = "0.7.1", features = ["esp32s3"] }
esp-println = { version = "0.8.0", features = ["esp32s3"] }
heapless = "0.8.0"
hmac = { version = "0.12.1", default-features = false }
lis3dh-async = "0.8.0"
@ -56,7 +56,7 @@ usbd-serial = "0.2.0"
default = ["rt", "vectored", "embassy-integrated-timers"]
async = ["esp-hal-common/async"]
debug = ["esp-hal-common/debug"]
defmt = ["esp-hal-common/defmt", "esp-println/defmt"]
defmt = ["esp-hal-common/defmt", "esp-println/defmt-espflash"]
embedded-io = ["esp-hal-common/embedded-io"]
eh1 = ["esp-hal-common/eh1"]
log = ["esp-hal-common/log", "esp-println/log"]
@ -161,3 +161,8 @@ required-features = ["embassy", "async"]
[[example]]
name = "embassy_usb_serial_jtag"
required-features = ["embassy", "async"]
[patch.crates-io]
embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }
embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }
embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "0027a76" }