From 816b214403b7ce524cbb6ce85732df70f5b8f19e Mon Sep 17 00:00:00 2001 From: Rasmus Melchior Jacobsen Date: Sat, 14 Jan 2023 07:12:43 +0100 Subject: [PATCH] Only implement Write --- embassy-stm32/src/usart/mod.rs | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/embassy-stm32/src/usart/mod.rs b/embassy-stm32/src/usart/mod.rs index 1c13d9ec..1f50e5dc 100644 --- a/embassy-stm32/src/usart/mod.rs +++ b/embassy-stm32/src/usart/mod.rs @@ -912,7 +912,7 @@ mod eh1 { #[cfg(all(feature = "unstable-traits", feature = "nightly"))] mod eio { - use embedded_io::asynch::{Read, Write}; + use embedded_io::asynch::Read; use embedded_io::Io; use super::*; @@ -924,16 +924,6 @@ mod eio { type Error = Error; } - impl Read for Uart<'_, T, TxDma, RxDma> - where - T: BasicInstance, - RxDma: super::RxDma, - { - async fn read(&mut self, buf: &mut [u8]) -> Result { - self.read_until_idle(buf).await - } - } - impl Write for Uart<'_, T, TxDma, RxDma> where T: BasicInstance, @@ -949,23 +939,6 @@ mod eio { } } - impl Io for UartRx<'_, T, RxDma> - where - T: BasicInstance, - { - type Error = Error; - } - - impl Read for UartRx<'_, T, RxDma> - where - T: BasicInstance, - RxDma: super::RxDma, - { - async fn read(&mut self, buf: &mut [u8]) -> Result { - self.read_until_idle(buf).await - } - } - impl Io for UartTx<'_, T, TxDma> where T: BasicInstance,