From 5cafe9dd0bfc24b4243cc5e5d6be6b7c7556f3a3 Mon Sep 17 00:00:00 2001 From: Finomnis Date: Fri, 5 Jul 2024 18:19:51 +0200 Subject: Fix STM32 Monotonic for peripherals with only two Clock Compare modules (#960) * Update dependencies of stm32g0 timer example * Replace obsolete probe-run with probe-rs run * Modify stm32 monotonic to work with timers that have only 2 compare modules * Add changelog * Fix typo --- rtic-monotonics/src/rp2040.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rtic-monotonics/src/rp2040.rs') diff --git a/rtic-monotonics/src/rp2040.rs b/rtic-monotonics/src/rp2040.rs index 47146b4..c8afa2e 100644 --- a/rtic-monotonics/src/rp2040.rs +++ b/rtic-monotonics/src/rp2040.rs @@ -94,7 +94,7 @@ impl TimerQueueBackend for TimerBackend { // Since the timer may or may not overflow based on the requested compare val, we check // how many ticks are left. - // `wrapping_sup` takes care of the u64 integer overflow special case. + // `wrapping_sub` takes care of the u64 integer overflow special case. let val = if instant.wrapping_sub(now) <= MAX { instant & MAX } else { -- cgit v1.2.3