Just impl Write
This commit is contained in:
parent
be1ed104e4
commit
f5ead85377
@ -1068,28 +1068,10 @@ mod _embedded_io {
|
|||||||
type Error = Error;
|
type Error = Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, U: Instance> embedded_io_async::ErrorType for UarteRx<'d, U> {
|
|
||||||
type Error = Error;
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<'d, U: Instance> embedded_io_async::ErrorType for UarteTx<'d, U> {
|
impl<'d, U: Instance> embedded_io_async::ErrorType for UarteTx<'d, U> {
|
||||||
type Error = Error;
|
type Error = Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'d, U: Instance> embedded_io_async::Read for Uarte<'d, U> {
|
|
||||||
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
|
||||||
self.read(buf).await?;
|
|
||||||
Ok(buf.len())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<'d: 'd, U: Instance> embedded_io_async::Read for UarteRx<'d, U> {
|
|
||||||
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error> {
|
|
||||||
self.read(buf).await?;
|
|
||||||
Ok(buf.len())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<'d, U: Instance> embedded_io_async::Write for Uarte<'d, U> {
|
impl<'d, U: Instance> embedded_io_async::Write for Uarte<'d, U> {
|
||||||
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
async fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error> {
|
||||||
self.write(buf).await?;
|
self.write(buf).await?;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user