diff options
author | 2019-10-29 08:02:30 +0000 | |
---|---|---|
committer | 2019-10-29 08:02:30 +0000 | |
commit | 5e8756752e91f17e76db5118637efddfaeb96382 (patch) | |
tree | b460b2149bab702fa707f2f805bf3bf0c7a4e920 | |
parent | f505673246117276ecfab692e4b1303dc7496d32 (diff) | |
parent | 36651038cc66fc52b9719c23c3cd95792c8b025f (diff) | |
download | cortex-m-5e8756752e91f17e76db5118637efddfaeb96382.tar.gz cortex-m-5e8756752e91f17e76db5118637efddfaeb96382.tar.zst cortex-m-5e8756752e91f17e76db5118637efddfaeb96382.zip |
Merge #167
167: Deprecate basepri/basepri_max on thumbv8m.base r=korken89 a=JJJollyjim
First step in resolving #155
Co-authored-by: Jamie McClymont <jamie@kwiius.com>
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | build.rs | 1 | ||||
-rw-r--r-- | src/register/mod.rs | 27 |
3 files changed, 29 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d44da6..c4a4a2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +### Deprecation + +- Deprecated incorrectly included registers (`BASPRI`, `BASEPRI_MAX`, `FAULTMASK`) on `thumbv8.base` + ## [v0.6.1] - 2019-08-21 ### Fixed @@ -29,6 +29,7 @@ fn main() { } else if target.starts_with("thumbv8m.base") { println!("cargo:rustc-cfg=cortex_m"); println!("cargo:rustc-cfg=armv8m"); + println!("cargo:rustc-cfg=armv8m_base"); } else if target.starts_with("thumbv8m.main") { println!("cargo:rustc-cfg=cortex_m"); println!("cargo:rustc-cfg=armv8m"); diff --git a/src/register/mod.rs b/src/register/mod.rs index 854d725..e7879c5 100644 --- a/src/register/mod.rs +++ b/src/register/mod.rs @@ -26,15 +26,36 @@ //! //! - Cortex-M* Devices Generic User Guide - Section 2.1.3 Core registers -#[cfg(not(armv6m))] +#[cfg(all(not(armv6m), not(armv8m_base)))] pub mod basepri; -#[cfg(not(armv6m))] +#[cfg(armv8m_base)] +#[deprecated( + since = "0.6.2", + note = "basepri is unavailable on thumbv8.base, and will be removed in the next release" +)] +pub mod basepri; + +#[cfg(all(not(armv6m), not(armv8m_base)))] +pub mod basepri_max; + +#[cfg(armv8m_base)] +#[deprecated( + since = "0.6.2", + note = "basepri is unavailable on thumbv8m.base, and will be removed in the next release" +)] pub mod basepri_max; pub mod control; -#[cfg(not(armv6m))] +#[cfg(all(not(armv6m), not(armv8m_base)))] +pub mod faultmask; + +#[cfg(armv8m_base)] +#[deprecated( + since = "0.6.2", + note = "faultmask is unavailable on thumbv8m.base, and will be removed in the next release" +)] pub mod faultmask; pub mod msp; |