1
1
#[ test]
2
2
fn cpuid ( ) {
3
- let cpuid = unsafe { & * :: peripheral:: CPUID . get ( ) } ;
3
+ let cpuid = unsafe { & * :: peripheral:: CPUID :: ptr ( ) } ;
4
4
5
5
assert_eq ! ( address( & cpuid. base) , 0xE000_ED00 ) ;
6
6
assert_eq ! ( address( & cpuid. pfr) , 0xE000_ED40 ) ;
@@ -16,7 +16,7 @@ fn cpuid() {
16
16
17
17
#[ test]
18
18
fn dcb ( ) {
19
- let dcb = unsafe { & * :: peripheral:: DCB . get ( ) } ;
19
+ let dcb = unsafe { & * :: peripheral:: DCB :: ptr ( ) } ;
20
20
21
21
assert_eq ! ( address( & dcb. dhcsr) , 0xE000_EDF0 ) ;
22
22
assert_eq ! ( address( & dcb. dcrsr) , 0xE000_EDF4 ) ;
@@ -26,7 +26,7 @@ fn dcb() {
26
26
27
27
#[ test]
28
28
fn dwt ( ) {
29
- let dwt = unsafe { & * :: peripheral:: DWT . get ( ) } ;
29
+ let dwt = unsafe { & * :: peripheral:: DWT :: ptr ( ) } ;
30
30
31
31
assert_eq ! ( address( & dwt. ctrl) , 0xE000_1000 ) ;
32
32
assert_eq ! ( address( & dwt. cyccnt) , 0xE000_1004 ) ;
@@ -48,7 +48,7 @@ fn dwt() {
48
48
49
49
#[ test]
50
50
fn fpb ( ) {
51
- let fpb = unsafe { & * :: peripheral:: FPB . get ( ) } ;
51
+ let fpb = unsafe { & * :: peripheral:: FPB :: ptr ( ) } ;
52
52
53
53
assert_eq ! ( address( & fpb. ctrl) , 0xE000_2000 ) ;
54
54
assert_eq ! ( address( & fpb. remap) , 0xE000_2004 ) ;
@@ -60,7 +60,7 @@ fn fpb() {
60
60
61
61
#[ test]
62
62
fn fpu ( ) {
63
- let fpu = unsafe { & * :: peripheral:: FPU . get ( ) } ;
63
+ let fpu = unsafe { & * :: peripheral:: FPU :: ptr ( ) } ;
64
64
65
65
assert_eq ! ( address( & fpu. fpccr) , 0xE000_EF34 ) ;
66
66
assert_eq ! ( address( & fpu. fpcar) , 0xE000_EF38 ) ;
@@ -72,7 +72,7 @@ fn fpu() {
72
72
73
73
#[ test]
74
74
fn itm ( ) {
75
- let itm = unsafe { & * :: peripheral:: ITM . get ( ) } ;
75
+ let itm = unsafe { & * :: peripheral:: ITM :: ptr ( ) } ;
76
76
77
77
assert_eq ! ( address( & itm. stim) , 0xE000_0000 ) ;
78
78
assert_eq ! ( address( & itm. ter) , 0xE000_0E00 ) ;
@@ -84,7 +84,7 @@ fn itm() {
84
84
85
85
#[ test]
86
86
fn mpu ( ) {
87
- let mpu = unsafe { & * :: peripheral:: MPU . get ( ) } ;
87
+ let mpu = unsafe { & * :: peripheral:: MPU :: ptr ( ) } ;
88
88
89
89
assert_eq ! ( address( & mpu. _type) , 0xE000ED90 ) ;
90
90
assert_eq ! ( address( & mpu. ctrl) , 0xE000ED94 ) ;
@@ -101,7 +101,7 @@ fn mpu() {
101
101
102
102
#[ test]
103
103
fn nvic ( ) {
104
- let nvic = unsafe { & * :: peripheral:: NVIC . get ( ) } ;
104
+ let nvic = unsafe { & * :: peripheral:: NVIC :: ptr ( ) } ;
105
105
106
106
assert_eq ! ( address( & nvic. iser) , 0xE000E100 ) ;
107
107
assert_eq ! ( address( & nvic. iser[ 7 ] ) , 0xE000E11C ) ;
@@ -119,7 +119,7 @@ fn nvic() {
119
119
120
120
#[ test]
121
121
fn scb ( ) {
122
- let scb = unsafe { & * :: peripheral:: SCB . get ( ) } ;
122
+ let scb = unsafe { & * :: peripheral:: SCB :: ptr ( ) } ;
123
123
124
124
assert_eq ! ( address( & scb. icsr) , 0xE000_ED04 ) ;
125
125
assert_eq ! ( address( & scb. vtor) , 0xE000_ED08 ) ;
@@ -140,7 +140,7 @@ fn scb() {
140
140
141
141
#[ test]
142
142
fn syst ( ) {
143
- let syst = unsafe { & * :: peripheral:: SYST . get ( ) } ;
143
+ let syst = unsafe { & * :: peripheral:: SYST :: ptr ( ) } ;
144
144
145
145
assert_eq ! ( address( & syst. csr) , 0xE000_E010 ) ;
146
146
assert_eq ! ( address( & syst. rvr) , 0xE000_E014 ) ;
@@ -151,7 +151,7 @@ fn syst() {
151
151
152
152
#[ test]
153
153
fn tpiu ( ) {
154
- let tpiu = unsafe { & * :: peripheral:: TPIU . get ( ) } ;
154
+ let tpiu = unsafe { & * :: peripheral:: TPIU :: ptr ( ) } ;
155
155
156
156
assert_eq ! ( address( & tpiu. sspsr) , 0xE004_0000 ) ;
157
157
assert_eq ! ( address( & tpiu. cspsr) , 0xE004_0004 ) ;
0 commit comments