diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2023-04-23 18:04:51 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-23 18:04:51 +0000 |
| commit | 9b15b4756a1456739d72a00e0184eff8702a6ab4 (patch) | |
| tree | ebaa3b6d8fc4b73da24fac7f16c54b8b90c529a1 /rtic-monotonics/src/rp2040.rs | |
| parent | ba134050fbcc870ee29e23c98366bf80511f6814 (diff) | |
| parent | 9eae3ed4befe6bbc7a9dd7c6e42f9a3bc0099b6e (diff) | |
Merge #743
743: Update embedded-hal-async r=korken89 a=datdenkikniet
Co-authored-by: datdenkikniet <jcdra1@gmail.com>
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; } } |
