From 9eae3ed4befe6bbc7a9dd7c6e42f9a3bc0099b6e Mon Sep 17 00:00:00 2001 From: datdenkikniet Date: Sun, 23 Apr 2023 16:34:18 +0200 Subject: Update embedded-hal-async --- rtic-monotonics/src/rp2040.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'rtic-monotonics/src/rp2040.rs') diff --git a/rtic-monotonics/src/rp2040.rs b/rtic-monotonics/src/rp2040.rs index ac1fc1a..a9fd3f3 100644 --- a/rtic-monotonics/src/rp2040.rs +++ b/rtic-monotonics/src/rp2040.rs @@ -25,6 +25,7 @@ //! ``` use super::Monotonic; + pub use super::{TimeoutError, TimerQueue}; use core::future::Future; pub use fugit::{self, ExtU64}; @@ -152,16 +153,12 @@ impl Monotonic for Timer { #[cfg(feature = "embedded-hal-async")] impl embedded_hal_async::delay::DelayUs for Timer { - type Error = core::convert::Infallible; - - async fn delay_us(&mut self, us: u32) -> Result<(), Self::Error> { - TIMER_QUEUE.delay((us as u64).micros()).await; - Ok(()) + async fn delay_us(&mut self, us: u32) { + Self::delay((us as u64).micros()).await; } - async fn delay_ms(&mut self, ms: u32) -> Result<(), Self::Error> { - TIMER_QUEUE.delay((ms as u64).millis()).await; - Ok(()) + async fn delay_ms(&mut self, ms: u32) { + Self::delay((ms as u64).millis()).await; } } -- cgit v1.2.3