1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
pub mod cpuid;
pub mod dcb;
pub mod dwt;
pub mod fpb;
pub mod fpu;
pub mod itm;
pub mod mpu;
pub mod nvic;
pub mod scb;
pub mod syst;
pub mod tpiu;
mod test;
const CPUID: usize = 0xE000_ED00;
const DCB: usize = 0xE000_EDF0;
const DWT: usize = 0xE000_1000;
const FPB: usize = 0xE000_2000;
const FPU: usize = 0xE000_EF30;
const ITM: usize = 0xE000_0000;
const MPU: usize = 0xE000_ED90;
const NVIC: usize = 0xE000_E100;
const SCB: usize = 0xE000_ED04;
const SYST: usize = 0xE000_E010;
const TPIU: usize = 0xE004_0000;
pub fn cpuid() -> &'static cpuid::Registers {
unsafe { ::deref(CPUID) }
}
pub fn dcb() -> &'static dcb::Registers {
unsafe { ::deref(DCB) }
}
pub unsafe fn dcb_mut() -> &'static mut dcb::Registers {
::deref_mut(DCB)
}
pub fn dwt() -> &'static dwt::Registers {
unsafe { ::deref(DWT) }
}
pub unsafe fn dwt_mut() -> &'static mut dwt::Registers {
::deref_mut(DWT)
}
pub fn fpb() -> &'static fpb::Registers {
unsafe { ::deref(FPB) }
}
pub unsafe fn fpb_mut() -> &'static mut fpb::Registers {
::deref_mut(FPB)
}
pub fn fpu() -> &'static fpu::Registers {
unsafe { ::deref(FPU) }
}
pub unsafe fn fpu_mut() -> &'static mut fpu::Registers {
::deref_mut(FPU)
}
pub fn itm() -> &'static itm::Registers {
unsafe { ::deref(ITM) }
}
pub unsafe fn itm_mut() -> &'static mut itm::Registers {
::deref_mut(ITM)
}
pub fn mpu() -> &'static mpu::Registers {
unsafe { ::deref(MPU) }
}
pub unsafe fn mpu_mut() -> &'static mut mpu::Registers {
::deref_mut(MPU)
}
pub fn nvic() -> &'static nvic::Registers {
unsafe { ::deref(NVIC) }
}
pub unsafe fn nvic_mut() -> &'static mut nvic::Registers {
::deref_mut(NVIC)
}
pub fn scb() -> &'static scb::Registers {
unsafe { ::deref(SCB) }
}
pub unsafe fn scb_mut() -> &'static mut scb::Registers {
::deref_mut(SCB)
}
pub fn syst() -> &'static syst::Registers {
unsafe { ::deref(SYST) }
}
pub unsafe fn syst_mut() -> &'static mut syst::Registers {
::deref_mut(SYST)
}
pub fn tpiu() -> &'static tpiu::Registers {
unsafe { ::deref(TPIU) }
}
pub unsafe fn tpiu_mut() -> &'static mut tpiu::Registers {
::deref_mut(TPIU)
}