diff options
| author | Dario Nieuwenhuis <[email protected]> | 2021-04-14 16:01:43 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2021-04-14 17:04:40 +0200 |
| commit | 59ccc45f280e05a9d2a0ece2bb1e01debadb2f7e (patch) | |
| tree | 14e39ffbab69238fb330fb21bd9d5894486d0d0b /embassy-traits/src | |
| parent | b34b74de9de38e4bee9a4c8d95246bf9d138f86f (diff) | |
Remove pin from Uart
Diffstat (limited to 'embassy-traits/src')
| -rw-r--r-- | embassy-traits/src/uart.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/embassy-traits/src/uart.rs b/embassy-traits/src/uart.rs index 5676e3fca..9e76306b0 100644 --- a/embassy-traits/src/uart.rs +++ b/embassy-traits/src/uart.rs | |||
| @@ -13,7 +13,7 @@ pub trait Read { | |||
| 13 | where | 13 | where |
| 14 | Self: 'a; | 14 | Self: 'a; |
| 15 | 15 | ||
| 16 | fn read<'a>(self: Pin<&'a mut Self>, buf: &'a mut [u8]) -> Self::ReadFuture<'a>; | 16 | fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Self::ReadFuture<'a>; |
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | pub trait ReadUntilIdle { | 19 | pub trait ReadUntilIdle { |
| @@ -23,10 +23,7 @@ pub trait ReadUntilIdle { | |||
| 23 | 23 | ||
| 24 | /// Receive into the buffer until the buffer is full or the line is idle after some bytes are received | 24 | /// Receive into the buffer until the buffer is full or the line is idle after some bytes are received |
| 25 | /// Return the number of bytes received | 25 | /// Return the number of bytes received |
| 26 | fn read_until_idle<'a>( | 26 | fn read_until_idle<'a>(&'a mut self, buf: &'a mut [u8]) -> Self::ReadUntilIdleFuture<'a>; |
| 27 | self: Pin<&'a mut Self>, | ||
| 28 | buf: &'a mut [u8], | ||
| 29 | ) -> Self::ReadUntilIdleFuture<'a>; | ||
| 30 | } | 27 | } |
| 31 | 28 | ||
| 32 | pub trait Write { | 29 | pub trait Write { |
| @@ -34,5 +31,5 @@ pub trait Write { | |||
| 34 | where | 31 | where |
| 35 | Self: 'a; | 32 | Self: 'a; |
| 36 | 33 | ||
| 37 | fn write<'a>(self: Pin<&'a mut Self>, buf: &'a [u8]) -> Self::WriteFuture<'a>; | 34 | fn write<'a>(&'a mut self, buf: &'a [u8]) -> Self::WriteFuture<'a>; |
| 38 | } | 35 | } |
