aboutsummaryrefslogtreecommitdiff
path: root/rtic-monotonics/src/systick.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rtic-monotonics/src/systick.rs')
-rw-r--r--rtic-monotonics/src/systick.rs13
1 files changed, 5 insertions, 8 deletions
diff --git a/rtic-monotonics/src/systick.rs b/rtic-monotonics/src/systick.rs
index 0f215a7..fe66a20 100644
--- a/rtic-monotonics/src/systick.rs
+++ b/rtic-monotonics/src/systick.rs
@@ -129,6 +129,7 @@ impl Systick {
}
/// Delay to some specific time instant.
+ #[inline]
pub async fn delay_until(instant: <Self as Monotonic>::Instant) {
SYSTICK_TIMER_QUEUE.delay_until(instant).await;
}
@@ -173,16 +174,12 @@ impl Monotonic for Systick {
#[cfg(feature = "embedded-hal-async")]
impl embedded_hal_async::delay::DelayUs for Systick {
- type Error = core::convert::Infallible;
-
- async fn delay_us(&mut self, us: u32) -> Result<(), Self::Error> {
- SYSTICK_TIMER_QUEUE.delay(us.micros()).await;
- Ok(())
+ async fn delay_us(&mut self, us: u32) {
+ Self::delay(us.micros()).await;
}
- async fn delay_ms(&mut self, ms: u32) -> Result<(), Self::Error> {
- SYSTICK_TIMER_QUEUE.delay(ms.millis()).await;
- Ok(())
+ async fn delay_ms(&mut self, ms: u32) {
+ Self::delay(ms.millis()).await;
}
}