File tree 2 files changed +11
-17
lines changed
2 files changed +11
-17
lines changed Original file line number Diff line number Diff line change @@ -8,22 +8,22 @@ use interrupt::Nr;
8
8
#[ repr( C ) ]
9
9
pub struct RegisterBlock {
10
10
/// Interrupt Set-Enable
11
- pub iser : [ RW < u32 > ; 8 ] ,
12
- reserved0 : [ u32 ; 24 ] ,
11
+ pub iser : [ RW < u32 > ; 16 ] ,
12
+ reserved0 : [ u32 ; 16 ] ,
13
13
/// Interrupt Clear-Enable
14
- pub icer : [ RW < u32 > ; 8 ] ,
15
- reserved1 : [ u32 ; 24 ] ,
14
+ pub icer : [ RW < u32 > ; 16 ] ,
15
+ reserved1 : [ u32 ; 16 ] ,
16
16
/// Interrupt Set-Pending
17
- pub ispr : [ RW < u32 > ; 8 ] ,
18
- reserved2 : [ u32 ; 24 ] ,
17
+ pub ispr : [ RW < u32 > ; 16 ] ,
18
+ reserved2 : [ u32 ; 16 ] ,
19
19
/// Interrupt Clear-Pending
20
- pub icpr : [ RW < u32 > ; 8 ] ,
21
- reserved3 : [ u32 ; 24 ] ,
20
+ pub icpr : [ RW < u32 > ; 16 ] ,
21
+ reserved3 : [ u32 ; 16 ] ,
22
22
/// Interrupt Active Bit
23
- pub iabr : [ RO < u32 > ; 8 ] ,
24
- reserved4 : [ u32 ; 56 ] ,
23
+ pub iabr : [ RO < u32 > ; 16 ] ,
24
+ reserved4 : [ u32 ; 48 ] ,
25
25
/// Interrupt Priority
26
- pub ipr : [ RW < u8 > ; 240 ] ,
26
+ pub ipr : [ RW < u8 > ; 496 ] ,
27
27
}
28
28
29
29
impl RegisterBlock {
Original file line number Diff line number Diff line change @@ -104,17 +104,11 @@ fn nvic() {
104
104
let nvic = unsafe { & * :: peripheral:: NVIC :: ptr ( ) } ;
105
105
106
106
assert_eq ! ( address( & nvic. iser) , 0xE000E100 ) ;
107
- assert_eq ! ( address( & nvic. iser[ 7 ] ) , 0xE000E11C ) ;
108
107
assert_eq ! ( address( & nvic. icer) , 0xE000E180 ) ;
109
- assert_eq ! ( address( & nvic. icer[ 7 ] ) , 0xE000E19C ) ;
110
108
assert_eq ! ( address( & nvic. ispr) , 0xE000E200 ) ;
111
- assert_eq ! ( address( & nvic. ispr[ 7 ] ) , 0xE000E21C ) ;
112
109
assert_eq ! ( address( & nvic. icpr) , 0xE000E280 ) ;
113
- assert_eq ! ( address( & nvic. icpr[ 7 ] ) , 0xE000E29C ) ;
114
110
assert_eq ! ( address( & nvic. iabr) , 0xE000E300 ) ;
115
- assert_eq ! ( address( & nvic. iabr[ 7 ] ) , 0xE000E31C ) ;
116
111
assert_eq ! ( address( & nvic. ipr) , 0xE000E400 ) ;
117
- assert_eq ! ( address( & nvic. ipr[ 239 ] ) , 0xE000E4eF ) ;
118
112
}
119
113
120
114
#[ test]
You can’t perform that action at this time.
0 commit comments