Skip to content

Commit 727d977

Browse files
authored
Merge pull request #967 from Gip-Gip/embio-0.7
Updated embedded-io to 0.7.1
2 parents 400ceeb + ad0cce7 commit 727d977

File tree

8 files changed

+29
-4
lines changed

8 files changed

+29
-4
lines changed

rp2040-hal-examples/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ embedded-alloc = "0.5.1"
2323
embedded-hal = "1.0.0"
2424
embedded-hal-async = "1.0.0"
2525
embedded-hal-bus = {version = "0.2.0", features = ["defmt-03"]}
26-
embedded-io = "0.6.1"
26+
embedded-io = "0.7.1"
2727
embedded_hal_0_2 = {package = "embedded-hal", version = "0.2.5", features = ["unproven"]}
2828
fugit = "0.3.6"
2929
futures = {version = "0.3.30", default-features = false, features = ["async-await"]}

rp2040-hal/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@ The Minimum-Supported Rust Version (MSRV) for the next release is 1.81
1313

1414
- Bump MSRV to 1.81 because the crate `home` (an indirect build-depencency) requires it.
1515

16+
### Added
17+
- Implement core::fmt::Display and core::err:Error for ReadErrorType per the requirements of embedded-io 0.7.1
18+
1619
### Changed
1720

1821
- Update to pio 0.3.0
1922
- Update rand\_core to 0.9.3
23+
- Update embedded-io to 0.7.1
2024

2125
## [0.11.0] - 2024-12-22
2226

rp2040-hal/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ embedded-dma = "0.2.0"
2626
embedded-hal = "1.0.0"
2727
embedded-hal-async = "1.0.0"
2828
embedded-hal-nb = "1.0.0"
29-
embedded-io = "0.6.1"
29+
embedded-io = "0.7.1"
3030
embedded_hal_0_2 = {package = "embedded-hal", version = "0.2.5", features = ["unproven"]}
3131
frunk = {version = "0.4.1", default-features = false}
3232
fugit = "0.3.6"

rp2040-hal/src/uart/peripheral.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,14 @@ impl<D: UartDevice, P: ValidUartPinout<D>> fmt::Write for UartPeripheral<Enabled
466466
}
467467
}
468468

469+
impl core::fmt::Display for ReadErrorType {
470+
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
471+
write!(f, "{:?}", self)
472+
}
473+
}
474+
475+
impl core::error::Error for ReadErrorType {}
476+
469477
impl embedded_io::Error for ReadErrorType {
470478
fn kind(&self) -> embedded_io::ErrorKind {
471479
embedded_io::ErrorKind::Other

rp235x-hal-examples/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dht-sensor = "0.2.1"
2222
embedded-alloc = "0.5.1"
2323
embedded-hal = "1.0.0"
2424
embedded-hal-async = "1.0.0"
25-
embedded-io = "0.6.1"
25+
embedded-io = "0.7.1"
2626
embedded_hal_0_2 = {package = "embedded-hal", version = "0.2.5", features = ["unproven"]}
2727
fugit = "0.3.6"
2828
futures = {version = "0.3.30", default-features = false, features = ["async-await"]}

rp235x-hal/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@ The Minimum-Supported Rust Version (MSRV) for the next release is 1.81
1313

1414
- Bump MSRV to 1.81 because the crate `home` (an indirect build-depencency) requires it.
1515

16+
### Added
17+
- Implement core::fmt::Display and core::err:Error for ReadErrorType per the requirements of embedded-io 0.7.1
18+
1619
### Changed
1720

1821
- Update to pio 0.3.0
1922
- Update rand\_core to 0.9.3
23+
- Update embedded-io to 0.7.1
2024
- Fix handling of flags in `RebootKind::BootSel` reboot.
2125

2226
## [0.3.0] - 2025-03-02

rp235x-hal/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ embedded-dma = "0.2.0"
2525
embedded-hal = "1.0.0"
2626
embedded-hal-async = "1.0.0"
2727
embedded-hal-nb = "1.0.0"
28-
embedded-io = "0.6.1"
28+
embedded-io = "0.7.1"
2929
embedded_hal_0_2 = {package = "embedded-hal", version = "0.2.5", features = ["unproven"]}
3030
frunk = {version = "0.4.1", default-features = false}
3131
fugit = "0.3.6"

rp235x-hal/src/uart/peripheral.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,11 +466,20 @@ impl<D: UartDevice, P: ValidUartPinout<D>> fmt::Write for UartPeripheral<Enabled
466466
}
467467
}
468468

469+
impl core::fmt::Display for ReadErrorType {
470+
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
471+
write!(f, "{:?}", self)
472+
}
473+
}
474+
475+
impl core::error::Error for ReadErrorType {}
476+
469477
impl embedded_io::Error for ReadErrorType {
470478
fn kind(&self) -> embedded_io::ErrorKind {
471479
embedded_io::ErrorKind::Other
472480
}
473481
}
482+
474483
impl<D: UartDevice, P: ValidUartPinout<D>> embedded_io::ErrorType
475484
for UartPeripheral<Enabled, D, P>
476485
{

0 commit comments

Comments
 (0)