mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-16 21:05:35 +01:00
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:
parent
9aeae030e7
commit
918f9c3f13
22 changed files with 82 additions and 145 deletions
|
|
@ -17,6 +17,7 @@ For each category, *Added*, *Changed*, *Fixed* add new entries at the top!
|
|||
|
||||
### Changed
|
||||
|
||||
- Replace `atomic-polyfill` with `portable-atomic`
|
||||
- Rework all timers based on `rtic-time 2.0.0`
|
||||
- Most timer tick rates are now configurable
|
||||
- Tweak `build.rs` to avoid warnings in Nightly 1.78+
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ rustdoc-flags = ["--cfg", "docsrs"]
|
|||
[dependencies]
|
||||
rtic-time = { version = "2.0.0", path = "../rtic-time" }
|
||||
fugit = { version = "0.3.6" }
|
||||
atomic-polyfill = "1"
|
||||
portable-atomic = { version = "1" }
|
||||
cfg-if = "1.0.0"
|
||||
cortex-m = { version = "0.7.6", optional = true }
|
||||
critical-section = { version = "1", optional = true }
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -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},
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue