mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-29 06:54:33 +01:00
bump cortex-m version to v0.3.1
barrier! is no longer needed
This commit is contained in:
parent
877a32448f
commit
6577f4a91a
2 changed files with 1 additions and 10 deletions
|
@ -13,7 +13,7 @@ repository = "https://github.com/japaric/cortex-m-rtfm"
|
|||
version = "0.2.0"
|
||||
|
||||
[dependencies]
|
||||
cortex-m = "0.3.0"
|
||||
cortex-m = "0.3.1"
|
||||
static-ref = "0.2.0"
|
||||
|
||||
[dependencies.cortex-m-rtfm-macros]
|
||||
|
|
|
@ -19,13 +19,6 @@ use cortex_m::interrupt::Nr;
|
|||
#[cfg(not(armv6m))]
|
||||
use cortex_m::register::{basepri_max, basepri};
|
||||
|
||||
#[cfg(not(armv6m))]
|
||||
macro_rules! barrier {
|
||||
() => {
|
||||
asm!("" ::: "memory" : "volatile");
|
||||
}
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
unsafe fn claim<T, U, R, F, G>(
|
||||
data: T,
|
||||
|
@ -54,9 +47,7 @@ where
|
|||
let old = basepri::read();
|
||||
let hw = (max_priority - ceiling) << (8 - nvic_prio_bits);
|
||||
basepri_max::write(hw);
|
||||
barrier!();
|
||||
let ret = f(g(data), &mut Threshold(ceiling));
|
||||
barrier!();
|
||||
basepri::write(old);
|
||||
ret
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue