Skip to content

Commit 22d745d

Browse files
committed
Revert "Expose the orphaned ICTR/ACTLR registers."
This reverts commit 196d496.
1 parent ae20ed3 commit 22d745d

File tree

2 files changed

+2
-79
lines changed

2 files changed

+2
-79
lines changed

src/peripheral/icb.rs

Lines changed: 0 additions & 30 deletions
This file was deleted.

src/peripheral/mod.rs

Lines changed: 2 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
//!
6969
//! - ARMv7-M Architecture Reference Manual (Issue E.b) - Chapter B3
7070
71-
// TODO stand-alone register: STIR
71+
// TODO stand-alone registers: ICTR, ACTLR and STIR
7272

7373

7474
use core::marker::PhantomData;
@@ -86,7 +86,6 @@ pub mod fpb;
8686
// NOTE(target_arch) is for documentation purposes
8787
#[cfg(any(has_fpu, target_arch = "x86_64"))]
8888
pub mod fpu;
89-
pub mod icb;
9089
#[cfg(not(armv6m))]
9190
pub mod itm;
9291
pub mod mpu;
@@ -122,14 +121,7 @@ pub struct Peripherals {
122121
/// Floating Point Unit (only present on `thumbv7em-none-eabihf`)
123122
pub FPU: FPU,
124123

125-
/// Implementation Control Block.
126-
///
127-
/// The name is from the v8-M spec, but the block existed in earlier
128-
/// revisions, without a name.
129-
pub ICB: ICB,
130-
131-
/// Instrumentation Trace Macrocell.
132-
/// Not available on Armv6-M and Armv8-M Baseline.
124+
/// Instrumentation Trace Macrocell (not present on Cortex-M0 variants)
133125
pub ITM: ITM,
134126

135127
/// Memory Protection Unit
@@ -193,9 +185,6 @@ impl Peripherals {
193185
FPU: FPU {
194186
_marker: PhantomData,
195187
},
196-
ICB: ICB {
197-
_marker: PhantomData,
198-
},
199188
ITM: ITM {
200189
_marker: PhantomData,
201190
},
@@ -375,42 +364,6 @@ impl ops::Deref for FPU {
375364
}
376365
}
377366

378-
/// Implementation Control Block.
379-
///
380-
/// This block contains implementation-defined registers like `ictr` and
381-
/// `actlr`. It's called the "implementation control block" in the ARMv8-M
382-
/// standard, but earlier standards contained the registers, just without a
383-
/// name.
384-
pub struct ICB {
385-
_marker: PhantomData<*const ()>,
386-
}
387-
388-
unsafe impl Send for ICB {}
389-
390-
impl ICB {
391-
/// Returns a pointer to the register block
392-
#[inline(always)]
393-
pub fn ptr() -> *mut icb::RegisterBlock {
394-
0xE000_E004 as *mut _
395-
}
396-
}
397-
398-
impl ops::Deref for ICB {
399-
type Target = self::icb::RegisterBlock;
400-
401-
#[inline(always)]
402-
fn deref(&self) -> &Self::Target {
403-
unsafe { &*Self::ptr() }
404-
}
405-
}
406-
407-
impl ops::DerefMut for ICB {
408-
#[inline(always)]
409-
fn deref_mut(&mut self) -> &mut Self::Target {
410-
unsafe { &mut *Self::ptr() }
411-
}
412-
}
413-
414367
/// Instrumentation Trace Macrocell
415368
pub struct ITM {
416369
_marker: PhantomData<*const ()>,

0 commit comments

Comments
 (0)