Skip to content

Commit 113f877

Browse files
committed
Deprecate basepri/basepri_max on thumbv8m.base
First step in resolving #155
1 parent 718cd17 commit 113f877

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ fn main() {
2929
} else if target.starts_with("thumbv8m.base") {
3030
println!("cargo:rustc-cfg=cortex_m");
3131
println!("cargo:rustc-cfg=armv8m");
32+
println!("cargo:rustc-cfg=armv8m_base");
3233
} else if target.starts_with("thumbv8m.main") {
3334
println!("cargo:rustc-cfg=cortex_m");
3435
println!("cargo:rustc-cfg=armv8m");

src/register/mod.rs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,24 @@
2626
//!
2727
//! - Cortex-M* Devices Generic User Guide - Section 2.1.3 Core registers
2828
29-
#[cfg(not(armv6m))]
29+
#[cfg(all(not(armv6m), not(armv8m_base)))]
3030
pub mod basepri;
3131

32-
#[cfg(not(armv6m))]
32+
#[cfg(armv8m_base)]
33+
#[deprecated(
34+
since = "0.6.2",
35+
note = "basepri is unavailable on armv8m.base, and will be removed in the next release"
36+
)]
37+
pub mod basepri;
38+
39+
#[cfg(all(not(armv6m), not(armv8m_base)))]
40+
pub mod basepri_max;
41+
42+
#[cfg(armv8m_base)]
43+
#[deprecated(
44+
since = "0.6.2",
45+
note = "basepri is unavailable on armv8m.base, and will be removed in the next release"
46+
)]
3347
pub mod basepri_max;
3448

3549
pub mod control;

0 commit comments

Comments
 (0)