aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf/src/uarte.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-08-16 00:40:56 +0200
committerGitHub <[email protected]>2023-08-16 00:40:56 +0200
commitf26dd54f6378be87a71f0c9f351b56851df96014 (patch)
tree6fbaea24c44d4fbbe01b08a0d87b9d8e49a4ad5a /embassy-nrf/src/uarte.rs
parentffe96889525105ac37cb74add67ac73f148726f6 (diff)
Update embedded-hal to 1.0.0-rc.1 (#1783)
Diffstat (limited to 'embassy-nrf/src/uarte.rs')
-rw-r--r--embassy-nrf/src/uarte.rs48
1 files changed, 0 insertions, 48 deletions
diff --git a/embassy-nrf/src/uarte.rs b/embassy-nrf/src/uarte.rs
index e79df3561..95434e7a7 100644
--- a/embassy-nrf/src/uarte.rs
+++ b/embassy-nrf/src/uarte.rs
@@ -949,51 +949,3 @@ mod eh02 {
949 } 949 }
950 } 950 }
951} 951}
952
953#[cfg(feature = "unstable-traits")]
954mod eh1 {
955 use super::*;
956
957 impl embedded_hal_1::serial::Error for Error {
958 fn kind(&self) -> embedded_hal_1::serial::ErrorKind {
959 match *self {
960 Self::BufferTooLong => embedded_hal_1::serial::ErrorKind::Other,
961 Self::BufferNotInRAM => embedded_hal_1::serial::ErrorKind::Other,
962 }
963 }
964 }
965
966 // =====================
967
968 impl<'d, T: Instance> embedded_hal_1::serial::ErrorType for Uarte<'d, T> {
969 type Error = Error;
970 }
971
972 impl<'d, T: Instance> embedded_hal_1::serial::Write for Uarte<'d, T> {
973 fn write(&mut self, buffer: &[u8]) -> Result<(), Self::Error> {
974 self.blocking_write(buffer)
975 }
976
977 fn flush(&mut self) -> Result<(), Self::Error> {
978 Ok(())
979 }
980 }
981
982 impl<'d, T: Instance> embedded_hal_1::serial::ErrorType for UarteTx<'d, T> {
983 type Error = Error;
984 }
985
986 impl<'d, T: Instance> embedded_hal_1::serial::Write for UarteTx<'d, T> {
987 fn write(&mut self, buffer: &[u8]) -> Result<(), Self::Error> {
988 self.blocking_write(buffer)
989 }
990
991 fn flush(&mut self) -> Result<(), Self::Error> {
992 Ok(())
993 }
994 }
995
996 impl<'d, T: Instance> embedded_hal_1::serial::ErrorType for UarteRx<'d, T> {
997 type Error = Error;
998 }
999}