Breaking change: portable-atomic (#922)

* Atomics: Replace polyfill with portable-atomic

* Update Cargo.lock for examples

* RTIC: portable-atomic: Update changelog

* rtic-monotonics: portable-atomic: Update changelog

* lm3s6965: enable critical-section when testing

* xtask: Enable portable-atomic/critical-section

When dealing with rtic-monotonics

* rtic-monotonics: portable-atomics: Do not disable the ability to fallback

---------

Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
This commit is contained in:
Henrik Tjäder 2024-06-23 08:45:49 +02:00 committed by GitHub
parent 9aeae030e7
commit 918f9c3f13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 82 additions and 145 deletions

View file

@ -26,7 +26,7 @@
//! }
//! ```
use atomic_polyfill::{AtomicU32, Ordering};
use portable_atomic::{AtomicU32, Ordering};
use rtic_time::{
half_period_counter::calculate_now,
timer_queue::{TimerQueue, TimerQueueBackend},

View file

@ -61,7 +61,7 @@ pub use nrf5340_net_pac::{self as pac, RTC0_NS as RTC0, RTC1_NS as RTC1};
#[doc(hidden)]
pub use nrf9160_pac::{self as pac, RTC0_NS as RTC0, RTC1_NS as RTC1};
use atomic_polyfill::{AtomicU32, Ordering};
use portable_atomic::{AtomicU32, Ordering};
use rtic_time::{
half_period_counter::calculate_now,
timer_queue::{TimerQueue, TimerQueueBackend},

View file

@ -71,7 +71,7 @@ pub use nrf5340_net_pac::{
#[doc(hidden)]
pub use nrf9160_pac::{self as pac, TIMER0_NS as TIMER0, TIMER1_NS as TIMER1, TIMER2_NS as TIMER2};
use atomic_polyfill::{AtomicU32, Ordering};
use portable_atomic::{AtomicU32, Ordering};
use rtic_time::{
half_period_counter::calculate_now,
timer_queue::{TimerQueue, TimerQueueBackend},

View file

@ -51,7 +51,7 @@ pub mod prelude {
pub use fugit::{self, ExtU64, ExtU64Ceil};
}
use atomic_polyfill::{AtomicU64, Ordering};
use portable_atomic::{AtomicU64, Ordering};
use rtic_time::{
half_period_counter::calculate_now,
timer_queue::{TimerQueue, TimerQueueBackend},

View file

@ -42,17 +42,17 @@ pub mod prelude {
pub use cortex_m::peripheral::SYST;
use atomic_polyfill::Ordering;
use portable_atomic::Ordering;
use rtic_time::timer_queue::TimerQueue;
use crate::TimerQueueBackend;
cfg_if::cfg_if! {
if #[cfg(feature = "systick-64bit")] {
use atomic_polyfill::AtomicU64;
use portable_atomic::AtomicU64;
static SYSTICK_CNT: AtomicU64 = AtomicU64::new(0);
} else {
use atomic_polyfill::AtomicU32;
use portable_atomic::AtomicU32;
static SYSTICK_CNT: AtomicU32 = AtomicU32::new(0);
}
}