M Cargo.toml => Cargo.toml +1 -1
@@ 62,7 62,7 @@ docsrs = ["rt", "atmega328p", "atmega32u4", "atmega2560", "attiny85", "atmega480
udebug = ["dep:ufmt"]
[dependencies]
-bare-metal = "0.2.5"
+bare-metal = "1.0.0"
vcell = "0.1.2"
cfg-if = "0.1.10"
ufmt = { version = "0.2.0", optional = true }
M src/interrupt.rs => src/interrupt.rs +3 -3
@@ 28,7 28,7 @@
//! });
//! ```
-pub use bare_metal::{CriticalSection, Mutex, Nr};
+pub use bare_metal::{CriticalSection, Mutex};
#[cfg(target_arch = "avr")]
use core::arch::asm;
@@ 215,14 215,14 @@ pub fn is_enabled() -> bool {
#[inline(always)]
pub fn free<F, R>(f: F) -> R
where
- F: FnOnce(&CriticalSection) -> R,
+ F: FnOnce(CriticalSection) -> R,
{
cfg_if::cfg_if! {
if #[cfg(target_arch = "avr")] {
// Disable interrupts. This is an optimization fence.
let irq_flag = disable_save();
- let r = f(unsafe { &CriticalSection::new() });
+ let r = f(unsafe { CriticalSection::new() });
// Restore interrupt state. This is an optimization fence.
unsafe { restore(irq_flag); }