Skip to content

Commit 5e87567

Browse files
Merge #167
167: Deprecate basepri/basepri_max on thumbv8m.base r=korken89 a=JJJollyjim First step in resolving #155 Co-authored-by: Jamie McClymont <[email protected]>
2 parents f505673 + 3665103 commit 5e87567

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
### Deprecation
11+
12+
- Deprecated incorrectly included registers (`BASPRI`, `BASEPRI_MAX`, `FAULTMASK`) on `thumbv8.base`
13+
1014
## [v0.6.1] - 2019-08-21
1115

1216
### Fixed

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: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,36 @@
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 thumbv8.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 thumbv8m.base, and will be removed in the next release"
46+
)]
3347
pub mod basepri_max;
3448

3549
pub mod control;
3650

37-
#[cfg(not(armv6m))]
51+
#[cfg(all(not(armv6m), not(armv8m_base)))]
52+
pub mod faultmask;
53+
54+
#[cfg(armv8m_base)]
55+
#[deprecated(
56+
since = "0.6.2",
57+
note = "faultmask is unavailable on thumbv8m.base, and will be removed in the next release"
58+
)]
3859
pub mod faultmask;
3960

4061
pub mod msp;

0 commit comments

Comments
 (0)