aboutsummaryrefslogtreecommitdiff
path: root/src/peripheral/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/peripheral/mod.rs')
-rw-r--r--src/peripheral/mod.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/peripheral/mod.rs b/src/peripheral/mod.rs
index af922b1..bf18151 100644
--- a/src/peripheral/mod.rs
+++ b/src/peripheral/mod.rs
@@ -60,8 +60,6 @@
use core::marker::PhantomData;
use core::ops;
-use crate::interrupt;
-
#[cfg(cm7)]
pub mod ac;
#[cfg(not(armv6m))]
@@ -165,7 +163,7 @@ impl Peripherals {
/// Returns all the core peripherals *once*
#[inline]
pub fn take() -> Option<Self> {
- interrupt::free(|_| {
+ critical_section::with(|_| {
if unsafe { TAKEN } {
None
} else {