diff options
| author | Martins Polakovs <mp@foo.lv> | 2024-04-21 13:46:29 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-21 10:46:29 +0000 |
| commit | 5d05d607eefde4a659150f8180457b0eed37bc8c (patch) | |
| tree | 17dae6b9f1cb264ee958f0a5716ccbe67cef308f /rtic-monotonics/src | |
| parent | acb9f446425a3bf6b00e542770bdbfd3c0bfe53e (diff) | |
Bump rp2040-pac to 0.6 in rtic-monotonics (#905)
* Support rp2040-pac v0.6 in rtic-monotonics
* Add changelog entry
* Fix rp2040_local_i2c_init example
Diffstat (limited to 'rtic-monotonics/src')
| -rw-r--r-- | rtic-monotonics/src/rp2040.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/rtic-monotonics/src/rp2040.rs b/rtic-monotonics/src/rp2040.rs index d4f590f..9c5a1dd 100644 --- a/rtic-monotonics/src/rp2040.rs +++ b/rtic-monotonics/src/rp2040.rs @@ -51,9 +51,9 @@ impl TimerBackend { /// /// Use the prelude macros instead. pub fn _start(timer: TIMER, resets: &RESETS) { - resets.reset.modify(|_, w| w.timer().clear_bit()); - while resets.reset_done.read().timer().bit_is_clear() {} - timer.inte.modify(|_, w| w.alarm_0().bit(true)); + resets.reset().modify(|_, w| w.timer().clear_bit()); + while resets.reset_done().read().timer().bit_is_clear() {} + timer.inte().modify(|_, w| w.alarm_0().bit(true)); TIMER_QUEUE.initialize(Self {}); @@ -76,10 +76,10 @@ impl TimerQueueBackend for TimerBackend { fn now() -> Self::Ticks { let timer = Self::timer(); - let mut hi0 = timer.timerawh.read().bits(); + let mut hi0 = timer.timerawh().read().bits(); loop { - let low = timer.timerawl.read().bits(); - let hi1 = timer.timerawh.read().bits(); + let low = timer.timerawl().read().bits(); + let hi1 = timer.timerawh().read().bits(); if hi0 == hi1 { break ((u64::from(hi0) << 32) | u64::from(low)); } @@ -102,12 +102,12 @@ impl TimerQueueBackend for TimerBackend { }; Self::timer() - .alarm0 + .alarm0() .write(|w| unsafe { w.bits(val as u32) }); } fn clear_compare_flag() { - Self::timer().intr.modify(|_, w| w.alarm_0().bit(true)); + Self::timer().intr().modify(|_, w| w.alarm_0().bit(true)); } fn pend_interrupt() { |
