diff options
Diffstat (limited to 'embassy-nrf/src/uarte.rs')
| -rw-r--r-- | embassy-nrf/src/uarte.rs | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/embassy-nrf/src/uarte.rs b/embassy-nrf/src/uarte.rs index 636d6c7a3..63df1b682 100644 --- a/embassy-nrf/src/uarte.rs +++ b/embassy-nrf/src/uarte.rs | |||
| @@ -986,7 +986,7 @@ mod eha { | |||
| 986 | 986 | ||
| 987 | type FlushFuture<'a> = impl Future<Output = Result<(), Self::Error>> + 'a where Self: 'a; | 987 | type FlushFuture<'a> = impl Future<Output = Result<(), Self::Error>> + 'a where Self: 'a; |
| 988 | 988 | ||
| 989 | fn flush<'a>(&'a mut self) -> Self::FlushFuture<'a> { | 989 | fn flush(&mut self) -> Result<(), Self::Error> { |
| 990 | async move { Ok(()) } | 990 | async move { Ok(()) } |
| 991 | } | 991 | } |
| 992 | } | 992 | } |
| @@ -1000,7 +1000,7 @@ mod eha { | |||
| 1000 | 1000 | ||
| 1001 | type FlushFuture<'a> = impl Future<Output = Result<(), Self::Error>> + 'a where Self: 'a; | 1001 | type FlushFuture<'a> = impl Future<Output = Result<(), Self::Error>> + 'a where Self: 'a; |
| 1002 | 1002 | ||
| 1003 | fn flush<'a>(&'a mut self) -> Self::FlushFuture<'a> { | 1003 | fn flush(&mut self) -> Result<(), Self::Error> { |
| 1004 | async move { Ok(()) } | 1004 | async move { Ok(()) } |
| 1005 | } | 1005 | } |
| 1006 | } | 1006 | } |
| @@ -1012,4 +1012,26 @@ mod eha { | |||
| 1012 | self.read(buffer) | 1012 | self.read(buffer) |
| 1013 | } | 1013 | } |
| 1014 | } | 1014 | } |
| 1015 | |||
| 1016 | impl<'d, U: Instance, T: TimerInstance> embedded_hal_async::serial::Read for UarteWithIdle<'d, U, T> { | ||
| 1017 | type ReadFuture<'a> = impl Future<Output = Result<(), Self::Error>> + 'a where Self: 'a; | ||
| 1018 | |||
| 1019 | fn read<'a>(&'a mut self, buffer: &'a mut [u8]) -> Self::ReadFuture<'a> { | ||
| 1020 | self.read(buffer) | ||
| 1021 | } | ||
| 1022 | } | ||
| 1023 | |||
| 1024 | impl<'d, U: Instance, T: TimerInstance> embedded_hal_async::serial::Write for UarteWithIdle<'d, U, T> { | ||
| 1025 | type WriteFuture<'a> = impl Future<Output = Result<(), Self::Error>> + 'a where Self: 'a; | ||
| 1026 | |||
| 1027 | fn write<'a>(&'a mut self, buffer: &'a [u8]) -> Self::WriteFuture<'a> { | ||
| 1028 | self.write(buffer) | ||
| 1029 | } | ||
| 1030 | |||
| 1031 | type FlushFuture<'a> = impl Future<Output = Result<(), Self::Error>> + 'a where Self: 'a; | ||
| 1032 | |||
| 1033 | fn flush(&mut self) -> Result<(), Self::Error> { | ||
| 1034 | async move { Ok(()) } | ||
| 1035 | } | ||
| 1036 | } | ||
| 1015 | } | 1037 | } |
