Skip to content

Commit 5ed9dc4

Browse files
committed
New 0.5.9 which re-exports the CORE_PERIPHERALS static from 0.6.0
1 parent 8fd4547 commit 5ed9dc4

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ license = "MIT OR Apache-2.0"
88
name = "cortex-m"
99
readme = "README.md"
1010
repository = "https://github.com/japaric/cortex-m"
11-
version = "0.5.8"
11+
version = "0.5.9"
1212

1313
[dependencies]
1414
aligned = "0.2.0"
1515
bare-metal = "0.2.0"
1616
volatile-register = "0.2.0"
17+
cortex_m_0_6 = { package = "cortex-m", version = "0.6.0" }
1718

1819
[features]
1920
cm7-r0p1 = []

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
extern crate aligned;
3838
extern crate bare_metal;
3939
extern crate volatile_register;
40+
extern crate cortex_m_0_6;
4041

4142
#[macro_use]
4243
mod macros;

src/peripheral/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ pub struct Peripherals {
147147
pub TPIU: TPIU,
148148
}
149149

150-
// NOTE `no_mangle` is used here to prevent linking different minor versions of this crate as that
151-
// would let you `take` the core peripherals more than once (one per minor version)
152-
#[no_mangle]
153-
static mut CORE_PERIPHERALS: bool = false;
150+
// Re-use the CORE_PERIPHERALS static from cortex-m v0.6.0 to allow interoperation
151+
extern "C" {
152+
static mut CORE_PERIPHERALS: bool;
153+
}
154154

155155
impl Peripherals {
156156
/// Returns all the core peripherals *once*

0 commit comments

Comments
 (0)