We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8342cd commit 62f0decCopy full SHA for 62f0dec
cortex-m/src/interrupt.rs
@@ -51,6 +51,7 @@ pub unsafe fn enable() {
51
/// Execute closure `f` in an interrupt-free context.
52
///
53
/// This as also known as a "critical section".
54
+#[cfg(cortex_m)]
55
#[inline]
56
pub fn free<F, R>(f: F) -> R
57
where
@@ -72,3 +73,12 @@ where
72
73
74
r
75
}
76
+
77
+/// No-operation included to continue presenting a `free()` method when
78
+/// the `cortex_m` cfg is not enabled.
79
+#[cfg(not(cortex_m))]
80
+pub fn free<F, R>(f: F) -> R
81
+where
82
+ F: FnOnce(&CriticalSection) -> R,
83
+{
84
+}
cortex-m/src/prelude.rs
@@ -1,3 +1,3 @@
1
//! Prelude
2
3
-pub use embedded_hal::prelude::*;
+pub use eh0::prelude::*;
0 commit comments