Skip to content

Commit

Permalink
Merge pull request #518 from Almeida-Oco/fix_cm7_feature
Browse files Browse the repository at this point in the history
Use correct cfg for `cm7` feature
  • Loading branch information
adamgreig authored Mar 23, 2024
2 parents 7ef5053 + 7208226 commit d85d9c8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cortex-m/src/peripheral/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
use core::marker::PhantomData;
use core::ops;

#[cfg(cm7)]
#[cfg(feature = "cm7")]
pub mod ac;
#[cfg(not(armv6m))]
pub mod cbp;
Expand Down Expand Up @@ -94,7 +94,7 @@ mod test;
#[allow(clippy::manual_non_exhaustive)]
pub struct Peripherals {
/// Cortex-M7 TCM and cache access control.
#[cfg(cm7)]
#[cfg(feature = "cm7")]
pub AC: AC,

/// Cache and branch predictor maintenance operations.
Expand Down Expand Up @@ -178,7 +178,7 @@ impl Peripherals {
TAKEN = true;

Peripherals {
#[cfg(cm7)]
#[cfg(feature = "cm7")]
AC: AC {
_marker: PhantomData,
},
Expand Down Expand Up @@ -230,15 +230,15 @@ impl Peripherals {
}

/// Access control
#[cfg(cm7)]
#[cfg(feature = "cm7")]
pub struct AC {
_marker: PhantomData<*const ()>,
}

#[cfg(cm7)]
#[cfg(feature = "cm7")]
unsafe impl Send for AC {}

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

0 comments on commit d85d9c8

Please sign in to comment.