aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrafael <[email protected]>2024-07-14 17:56:56 +0200
committerrafael <[email protected]>2024-07-14 17:56:56 +0200
commitd9ea5cb015f015c84013250db36a1332f6df3986 (patch)
tree115d59221f725b9faa76c4be22b4c70d9d7079ef
parentf5ebdebd96a7b72403fa3fee82b2f12de94499ef (diff)
stm after cargo fix
-rw-r--r--embassy-stm32/src/usart/buffered.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/embassy-stm32/src/usart/buffered.rs b/embassy-stm32/src/usart/buffered.rs
index eb639942c..06cc0e41d 100644
--- a/embassy-stm32/src/usart/buffered.rs
+++ b/embassy-stm32/src/usart/buffered.rs
@@ -437,8 +437,8 @@ impl<'d> BufferedUartRx<'d> {
437 } 437 }
438 438
439 /// we are ready to read if there is data in the buffer 439 /// we are ready to read if there is data in the buffer
440 fn read_ready() -> Result<bool, Error> { 440 fn read_ready(&mut self) -> Result<bool, Error> {
441 let state = T::buffered_state(); 441 let state = self.state;
442 Ok(!state.rx_buf.is_empty()) 442 Ok(!state.rx_buf.is_empty())
443 } 443 }
444 444
@@ -618,13 +618,13 @@ impl<'d> embedded_io_async::Read for BufferedUartRx<'d> {
618 618
619impl<'d> embedded_io_async::ReadReady for BufferedUart<'d> { 619impl<'d> embedded_io_async::ReadReady for BufferedUart<'d> {
620 fn read_ready(&mut self) -> Result<bool, Self::Error> { 620 fn read_ready(&mut self) -> Result<bool, Self::Error> {
621 BufferedUartRx::<'d>::read_ready() 621 BufferedUartRx::<'d>::read_ready(&mut self.rx)
622 } 622 }
623} 623}
624 624
625impl<'d> embedded_io_async::ReadReady for BufferedUartRx<'d> { 625impl<'d> embedded_io_async::ReadReady for BufferedUartRx<'d> {
626 fn read_ready(&mut self) -> Result<bool, Self::Error> { 626 fn read_ready(&mut self) -> Result<bool, Self::Error> {
627 Self::read_ready() 627 Self::read_ready(self)
628 } 628 }
629} 629}
630 630