Skip to content

Commit 411d045

Browse files
committed
fix one test
1 parent 7b94eb4 commit 411d045

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

cortex-m/src/peripheral/test.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,16 @@ fn mpu() {
109109

110110
#[test]
111111
fn nvic() {
112-
let nvic = unsafe { &*crate::peripheral::NVIC::PTR };
113-
114-
assert_eq!(address(&nvic.iser), 0xE000E100);
115-
assert_eq!(address(&nvic.icer), 0xE000E180);
116-
assert_eq!(address(&nvic.ispr), 0xE000E200);
117-
assert_eq!(address(&nvic.icpr), 0xE000E280);
118-
assert_eq!(address(&nvic.iabr), 0xE000E300);
119-
assert_eq!(address(&nvic.ipr), 0xE000E400);
112+
let nvic = unsafe { crate::peripheral::NVIC::steal() };
113+
114+
assert_eq!(address(nvic.pointer_to_iser_start()), 0xE000E100);
115+
assert_eq!(address(nvic.pointer_to_icer_start()), 0xE000E180);
116+
assert_eq!(address(nvic.pointer_to_ispr_start()), 0xE000E200);
117+
assert_eq!(address(nvic.pointer_to_icpr_start()), 0xE000E280);
118+
assert_eq!(address(nvic.pointer_to_iabr_start()), 0xE000E300);
119+
assert_eq!(address(nvic.pointer_to_ipr_start()), 0xE000E400);
120120
#[cfg(not(armv6m))]
121-
assert_eq!(address(&nvic.stir), 0xE000EF00);
121+
assert_eq!(address(nvic.pointer_to_stir()), 0xE000EF00);
122122
}
123123

124124
#[test]

0 commit comments

Comments
 (0)