Skip to content

Commit d85d9c8

Browse files
authored
Merge pull request #518 from Almeida-Oco/fix_cm7_feature
Use correct cfg for `cm7` feature
2 parents 7ef5053 + 7208226 commit d85d9c8

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
@@ -60,7 +60,7 @@
6060
use core::marker::PhantomData;
6161
use core::ops;
6262

63-
#[cfg(cm7)]
63+
#[cfg(feature = "cm7")]
6464
pub mod ac;
6565
#[cfg(not(armv6m))]
6666
pub mod cbp;
@@ -94,7 +94,7 @@ mod test;
9494
#[allow(clippy::manual_non_exhaustive)]
9595
pub struct Peripherals {
9696
/// Cortex-M7 TCM and cache access control.
97-
#[cfg(cm7)]
97+
#[cfg(feature = "cm7")]
9898
pub AC: AC,
9999

100100
/// Cache and branch predictor maintenance operations.
@@ -178,7 +178,7 @@ impl Peripherals {
178178
TAKEN = true;
179179

180180
Peripherals {
181-
#[cfg(cm7)]
181+
#[cfg(feature = "cm7")]
182182
AC: AC {
183183
_marker: PhantomData,
184184
},
@@ -230,15 +230,15 @@ impl Peripherals {
230230
}
231231

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

238-
#[cfg(cm7)]
238+
#[cfg(feature = "cm7")]
239239
unsafe impl Send for AC {}
240240

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

0 commit comments

Comments
 (0)