aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf/src/uarte.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-nrf/src/uarte.rs')
-rw-r--r--embassy-nrf/src/uarte.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/embassy-nrf/src/uarte.rs b/embassy-nrf/src/uarte.rs
index 049830aed..ef5d6c6d1 100644
--- a/embassy-nrf/src/uarte.rs
+++ b/embassy-nrf/src/uarte.rs
@@ -1092,6 +1092,20 @@ mod eh02 {
1092 } 1092 }
1093} 1093}
1094 1094
1095impl core::fmt::Display for Error {
1096 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1097 match *self {
1098 Self::BufferTooLong => f.write_str("BufferTooLong"),
1099 Self::BufferNotInRAM => f.write_str("BufferNotInRAM"),
1100 Self::Framing => f.write_str("Framing"),
1101 Self::Parity => f.write_str("Parity"),
1102 Self::Overrun => f.write_str("Overrun"),
1103 Self::Break => f.write_str("Break"),
1104 }
1105 }
1106}
1107impl core::error::Error for Error {}
1108
1095mod _embedded_io { 1109mod _embedded_io {
1096 use super::*; 1110 use super::*;
1097 1111
@@ -1121,6 +1135,9 @@ mod _embedded_io {
1121 self.write(buf).await?; 1135 self.write(buf).await?;
1122 Ok(buf.len()) 1136 Ok(buf.len())
1123 } 1137 }
1138 async fn flush(&mut self) -> Result<(), Self::Error> {
1139 Ok(())
1140 }
1124 } 1141 }
1125 1142
1126 impl<'d> embedded_io_async::Write for UarteTx<'d> { 1143 impl<'d> embedded_io_async::Write for UarteTx<'d> {
@@ -1128,5 +1145,8 @@ mod _embedded_io {
1128 self.write(buf).await?; 1145 self.write(buf).await?;
1129 Ok(buf.len()) 1146 Ok(buf.len())
1130 } 1147 }
1148 async fn flush(&mut self) -> Result<(), Self::Error> {
1149 Ok(())
1150 }
1131 } 1151 }
1132} 1152}