aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/peripheral/mod.rs70
1 files changed, 56 insertions, 14 deletions
diff --git a/src/peripheral/mod.rs b/src/peripheral/mod.rs
index 8951e86..c2bac99 100644
--- a/src/peripheral/mod.rs
+++ b/src/peripheral/mod.rs
@@ -237,7 +237,10 @@ impl CBP {
}
}
- /// Returns a pointer to the register block
+ /// Pointer to the register block
+ pub const CBP_PTR: *const self::cbp::RegisterBlock = 0xE000_EF50 as *const _;
+
+ /// Returns a pointer to the register block (to be deprecated in 0.7)
#[inline(always)]
pub const fn ptr() -> *const self::cbp::RegisterBlock {
0xE000_EF50 as *const _
@@ -262,7 +265,10 @@ pub struct CPUID {
unsafe impl Send for CPUID {}
impl CPUID {
- /// Returns a pointer to the register block
+ /// Pointer to the register block
+ pub const CPUID_PTR: *const self::cpuid::RegisterBlock = 0xE000_ED00 as *const _;
+
+ /// Returns a pointer to the register block (to be deprecated in 0.7)
#[inline(always)]
pub const fn ptr() -> *const self::cpuid::RegisterBlock {
0xE000_ED00 as *const _
@@ -286,7 +292,10 @@ pub struct DCB {
unsafe impl Send for DCB {}
impl DCB {
- /// Returns a pointer to the register block
+ /// Pointer to the register block
+ pub const DCB_PTR: *const dcb::RegisterBlock = 0xE000_EDF0 as *const _;
+
+ /// Returns a pointer to the register block (to be deprecated in 0.7)
#[inline(always)]
pub const fn ptr() -> *const dcb::RegisterBlock {
0xE000_EDF0 as *const _
@@ -310,7 +319,10 @@ pub struct DWT {
unsafe impl Send for DWT {}
impl DWT {
- /// Returns a pointer to the register block
+ /// Pointer to the register block
+ pub const DWT_PTR: *const dwt::RegisterBlock = 0xE000_1000 as *const _;
+
+ /// Returns a pointer to the register block (to be deprecated in 0.7)
#[inline(always)]
pub const fn ptr() -> *const dwt::RegisterBlock {
0xE000_1000 as *const _
@@ -335,7 +347,10 @@ unsafe impl Send for FPB {}
#[cfg(not(armv6m))]
impl FPB {
- /// Returns a pointer to the register block
+ /// Pointer to the register block
+ pub const FPB_PTR: *const fpb::RegisterBlock = 0xE000_2000 as *const _;
+
+ /// Returns a pointer to the register block (to be deprecated in 0.7)
#[inline(always)]
pub const fn ptr() -> *const fpb::RegisterBlock {
0xE000_2000 as *const _
@@ -361,7 +376,10 @@ unsafe impl Send for FPU {}
#[cfg(any(has_fpu, target_arch = "x86_64"))]
impl FPU {
- /// Returns a pointer to the register block
+ /// Pointer to the register block
+ pub const FPU_PTR: *const fpu::RegisterBlock = 0xE000_EF30 as *const _;
+
+ /// Returns a pointer to the register block (to be deprecated in 0.7)
#[inline(always)]
pub const fn ptr() -> *const fpu::RegisterBlock {
0xE000_EF30 as *const _
@@ -391,7 +409,10 @@ pub struct ICB {
unsafe impl Send for ICB {}
impl ICB {
- /// Returns a pointer to the register block
+ /// Pointer to the register block
+ pub const ICB_PTR: *mut icb::RegisterBlock = 0xE000_E004 as *mut _;
+
+ /// Returns a pointer to the register block (to be deprecated in 0.7)
#[inline(always)]
pub const fn ptr() -> *mut icb::RegisterBlock {
0xE000_E004 as *mut _
@@ -423,7 +444,10 @@ unsafe impl Send for ITM {}
#[cfg(all(not(armv6m), not(armv8m_base)))]
impl ITM {
- /// Returns a pointer to the register block
+ /// Pointer to the register block
+ pub const ITM_PTR: *mut itm::RegisterBlock = 0xE000_0000 as *mut _;
+
+ /// Returns a pointer to the register block (to be deprecated in 0.7)
#[inline(always)]
pub const fn ptr() -> *mut itm::RegisterBlock {
0xE000_0000 as *mut _
@@ -456,7 +480,10 @@ pub struct MPU {
unsafe impl Send for MPU {}
impl MPU {
- /// Returns a pointer to the register block
+ /// Pointer to the register block
+ pub const MPU_PTR: *const mpu::RegisterBlock = 0xE000_ED90 as *const _;
+
+ /// Returns a pointer to the register block (to be deprecated in 0.7)
#[inline(always)]
pub const fn ptr() -> *const mpu::RegisterBlock {
0xE000_ED90 as *const _
@@ -480,7 +507,10 @@ pub struct NVIC {
unsafe impl Send for NVIC {}
impl NVIC {
- /// Returns a pointer to the register block
+ /// Pointer to the register block
+ pub const NVIC_PTR: *const nvic::RegisterBlock = 0xE000_E100 as *const _;
+
+ /// Returns a pointer to the register block (to be deprecated in 0.7)
#[inline(always)]
pub const fn ptr() -> *const nvic::RegisterBlock {
0xE000_E100 as *const _
@@ -505,7 +535,10 @@ unsafe impl Send for SAU {}
#[cfg(armv8m)]
impl SAU {
- /// Returns a pointer to the register block
+ /// Pointer to the register block
+ pub const SAU_PTR: *const sau::RegisterBlock = 0xE000_EDD0 as *const _;
+
+ /// Returns a pointer to the register block (to be deprecated in 0.7)
#[inline(always)]
pub const fn ptr() -> *const sau::RegisterBlock {
0xE000_EDD0 as *const _
@@ -530,7 +563,10 @@ pub struct SCB {
unsafe impl Send for SCB {}
impl SCB {
- /// Returns a pointer to the register block
+ /// Pointer to the register block
+ pub const SCB_PTR: *const scb::RegisterBlock = 0xE000_ED04 as *const _;
+
+ /// Returns a pointer to the register block (to be deprecated in 0.7)
#[inline(always)]
pub const fn ptr() -> *const scb::RegisterBlock {
0xE000_ED04 as *const _
@@ -554,7 +590,10 @@ pub struct SYST {
unsafe impl Send for SYST {}
impl SYST {
- /// Returns a pointer to the register block
+ /// Pointer to the register block
+ pub const SYST_PTR: *const syst::RegisterBlock = 0xE000_E010 as *const _;
+
+ /// Returns a pointer to the register block (to be deprecated in 0.7)
#[inline(always)]
pub const fn ptr() -> *const syst::RegisterBlock {
0xE000_E010 as *const _
@@ -579,7 +618,10 @@ unsafe impl Send for TPIU {}
#[cfg(not(armv6m))]
impl TPIU {
- /// Returns a pointer to the register block
+ /// Pointer to the register block
+ pub const TPIU_PTR: *const tpiu::RegisterBlock = 0xE004_0000 as *const _;
+
+ /// Returns a pointer to the register block (to be deprecated in 0.7)
#[inline(always)]
pub const fn ptr() -> *const tpiu::RegisterBlock {
0xE004_0000 as *const _