From a2f153249f926876e7169016f3dc8e861a9ef065 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Sat, 1 Apr 2023 20:48:23 +0200 Subject: Added nRF monotonics --- rtic-time/src/monotonic.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'rtic-time/src/monotonic.rs') diff --git a/rtic-time/src/monotonic.rs b/rtic-time/src/monotonic.rs index 9b3742f..513cc07 100644 --- a/rtic-time/src/monotonic.rs +++ b/rtic-time/src/monotonic.rs @@ -33,6 +33,13 @@ pub trait Monotonic { /// queue in RTIC checks this. fn set_compare(instant: Self::Instant); + /// Override for the dequeue check, override with timers that have bugs. + /// + /// E.g. nRF52 RTCs needs to be dequeued if the time is within 4 ticks. + fn should_dequeue_check(release_at: Self::Instant) -> bool { + ::now() >= release_at + } + /// Clear the compare interrupt flag. fn clear_compare_flag(); -- cgit v1.2.3