diff options
| author | datdenkikniet <jcdra1@gmail.com> | 2023-04-23 16:34:18 +0200 |
|---|---|---|
| committer | datdenkikniet <jcdra1@gmail.com> | 2023-04-23 17:31:51 +0200 |
| commit | 9eae3ed4befe6bbc7a9dd7c6e42f9a3bc0099b6e (patch) | |
| tree | abefda6f74e45652186a0a83d1df1e7c061a2202 /rtic-monotonics/src/rp2040.rs | |
| parent | 688ba1cf5b777995b777f6ec9555b69cced5a218 (diff) | |
Update embedded-hal-async
Diffstat (limited to 'rtic-monotonics/src/rp2040.rs')
| -rw-r--r-- | rtic-monotonics/src/rp2040.rs | 13 |
1 files changed, 5 insertions, 8 deletions
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; } } |
