Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use correct cfg for cm7 feature #518

Merged
merged 1 commit into from
Mar 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading