Only implement Write

This commit is contained in:
Rasmus Melchior Jacobsen 2023-01-14 07:12:43 +01:00
parent 4c4b47f78a
commit 816b214403

View file

@ -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<T, TxDma, RxDma> Read for Uart<'_, T, TxDma, RxDma>
where
T: BasicInstance,
RxDma: super::RxDma<T>,
{
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
self.read_until_idle(buf).await
}
}
impl<T, TxDma, RxDma> Write for Uart<'_, T, TxDma, RxDma>
where
T: BasicInstance,
@ -949,23 +939,6 @@ mod eio {
}
}
impl<T, RxDma> Io for UartRx<'_, T, RxDma>
where
T: BasicInstance,
{
type Error = Error;
}
impl<T, RxDma> Read for UartRx<'_, T, RxDma>
where
T: BasicInstance,
RxDma: super::RxDma<T>,
{
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
self.read_until_idle(buf).await
}
}
impl<T, TxDma> Io for UartTx<'_, T, TxDma>
where
T: BasicInstance,