mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-23 20:22:51 +01:00
fix yet another warning on ARMv6-M
This commit is contained in:
parent
7d0c07cd39
commit
ad2a523cf9
1 changed files with 3 additions and 3 deletions
|
@ -94,7 +94,7 @@ where
|
||||||
pub unsafe fn claim<T, R, F>(
|
pub unsafe fn claim<T, R, F>(
|
||||||
data: T,
|
data: T,
|
||||||
ceiling: u8,
|
ceiling: u8,
|
||||||
nvic_prio_bits: u8,
|
_nvic_prio_bits: u8,
|
||||||
t: &mut Threshold,
|
t: &mut Threshold,
|
||||||
f: F,
|
f: F,
|
||||||
) -> R
|
) -> R
|
||||||
|
@ -108,13 +108,13 @@ where
|
||||||
|
|
||||||
#[cfg(not(armv6m))]
|
#[cfg(not(armv6m))]
|
||||||
() => {
|
() => {
|
||||||
let max_priority = 1 << nvic_prio_bits;
|
let max_priority = 1 << _nvic_prio_bits;
|
||||||
|
|
||||||
if ceiling == max_priority {
|
if ceiling == max_priority {
|
||||||
atomic(t, |t| f(data, t))
|
atomic(t, |t| f(data, t))
|
||||||
} else {
|
} else {
|
||||||
let old = basepri::read();
|
let old = basepri::read();
|
||||||
let hw = (max_priority - ceiling) << (8 - nvic_prio_bits);
|
let hw = (max_priority - ceiling) << (8 - _nvic_prio_bits);
|
||||||
basepri::write(hw);
|
basepri::write(hw);
|
||||||
let ret = f(data, &mut Threshold::new(ceiling));
|
let ret = f(data, &mut Threshold::new(ceiling));
|
||||||
basepri::write(old);
|
basepri::write(old);
|
||||||
|
|
Loading…
Reference in a new issue