Skip to content

Commit 0c5d85a

Browse files
committed
Fix cm7 / feature="cm7" mix-up
OK, that seems to be a genuine bug that this annoying new feature caught.
1 parent 069269c commit 0c5d85a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cortex-m/src/peripheral/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ use core::ops;
6262

6363
use crate::interrupt;
6464

65-
#[cfg(cm7)]
65+
#[cfg(feature = "cm7")]
6666
pub mod ac;
6767
#[cfg(not(armv6m))]
6868
pub mod cbp;
@@ -96,7 +96,7 @@ mod test;
9696
#[allow(clippy::manual_non_exhaustive)]
9797
pub struct Peripherals {
9898
/// Cortex-M7 TCM and cache access control.
99-
#[cfg(cm7)]
99+
#[cfg(feature = "cm7")]
100100
pub AC: AC,
101101

102102
/// Cache and branch predictor maintenance operations.
@@ -180,7 +180,7 @@ impl Peripherals {
180180
TAKEN = true;
181181

182182
Peripherals {
183-
#[cfg(cm7)]
183+
#[cfg(feature = "cm7")]
184184
AC: AC {
185185
_marker: PhantomData,
186186
},
@@ -232,15 +232,15 @@ impl Peripherals {
232232
}
233233

234234
/// Access control
235-
#[cfg(cm7)]
235+
#[cfg(feature = "cm7")]
236236
pub struct AC {
237237
_marker: PhantomData<*const ()>,
238238
}
239239

240-
#[cfg(cm7)]
240+
#[cfg(feature = "cm7")]
241241
unsafe impl Send for AC {}
242242

243-
#[cfg(cm7)]
243+
#[cfg(feature = "cm7")]
244244
impl AC {
245245
/// Pointer to the register block
246246
pub const PTR: *const self::ac::RegisterBlock = 0xE000_EF90 as *const _;

0 commit comments

Comments
 (0)