diff options
Diffstat (limited to 'embassy-nrf/src/buffered_uarte')
| -rw-r--r-- | embassy-nrf/src/buffered_uarte/v1.rs | 9 | ||||
| -rw-r--r-- | embassy-nrf/src/buffered_uarte/v2.rs | 8 |
2 files changed, 17 insertions, 0 deletions
diff --git a/embassy-nrf/src/buffered_uarte/v1.rs b/embassy-nrf/src/buffered_uarte/v1.rs index ec360f7d0..c14cdfadb 100644 --- a/embassy-nrf/src/buffered_uarte/v1.rs +++ b/embassy-nrf/src/buffered_uarte/v1.rs | |||
| @@ -874,6 +874,15 @@ impl<'a> Drop for BufferedUarteRx<'a> { | |||
| 874 | } | 874 | } |
| 875 | } | 875 | } |
| 876 | 876 | ||
| 877 | impl core::fmt::Display for Error { | ||
| 878 | fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { | ||
| 879 | match *self { | ||
| 880 | Error::Overrun => write!(f, "Buffer Overrun"), | ||
| 881 | } | ||
| 882 | } | ||
| 883 | } | ||
| 884 | impl core::error::Error for Error {} | ||
| 885 | |||
| 877 | mod _embedded_io { | 886 | mod _embedded_io { |
| 878 | use super::*; | 887 | use super::*; |
| 879 | 888 | ||
diff --git a/embassy-nrf/src/buffered_uarte/v2.rs b/embassy-nrf/src/buffered_uarte/v2.rs index d0d2d97d1..4a6360b69 100644 --- a/embassy-nrf/src/buffered_uarte/v2.rs +++ b/embassy-nrf/src/buffered_uarte/v2.rs | |||
| @@ -50,6 +50,14 @@ pub enum Error { | |||
| 50 | // No errors for now | 50 | // No errors for now |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | impl core::fmt::Display for Error { | ||
| 54 | fn fmt(&self, _f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { | ||
| 55 | match *self {} | ||
| 56 | } | ||
| 57 | } | ||
| 58 | |||
| 59 | impl core::error::Error for Error {} | ||
| 60 | |||
| 53 | impl State { | 61 | impl State { |
| 54 | pub(crate) const fn new() -> Self { | 62 | pub(crate) const fn new() -> Self { |
| 55 | Self { | 63 | Self { |
