From 5597a48f3361e8e77e5ec7edcb69ddf23051cd52 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 30 Apr 2025 15:46:01 +0200 Subject: [PATCH 1/2] add UART errors for embedded-io --- embedded-io/src/lib.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/embedded-io/src/lib.rs b/embedded-io/src/lib.rs index ae5ff485..34f12206 100644 --- a/embedded-io/src/lib.rs +++ b/embedded-io/src/lib.rs @@ -118,6 +118,16 @@ pub enum ErrorKind { OutOfMemory, /// An attempted write could not write any data. WriteZero, + + /// The peripheral receive buffer was overrun. + Overrun, + /// Received data does not conform to the peripheral configuration. + /// Can be caused by a misconfigured device on either end of the serial line. + FrameFormat, + /// Parity check failed. + Parity, + /// Serial line is too noisy to read valid data. + Noise, } #[cfg(feature = "std")] From 063878d3b808dbf0513c9c4f55575bb9bcd46836 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 30 Apr 2025 15:49:23 +0200 Subject: [PATCH 2/2] changelog --- embedded-io/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/embedded-io/CHANGELOG.md b/embedded-io/CHANGELOG.md index f7c2e0e6..9ccfac03 100644 --- a/embedded-io/CHANGELOG.md +++ b/embedded-io/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Migrated `std` feature-gated `std::error::Error` implementations to `core::error::Error` - Increased MSRV to 1.81 due to `core::error::Error` - Implemented `ReadReady` for `&[u8]` and `WriteReady` for `&mut [u8]` +- Added UART error variants `Overrun`, `FrameFormat`, `Parity` and `Noise` ## 0.6.1 - 2023-10-22