From 7ad309d78ded376f367f4e6e18c66ed2d8847e5b Mon Sep 17 00:00:00 2001 From: jazzpi Date: Thu, 16 Oct 2025 22:57:30 +0200 Subject: [PATCH] Fix device example --- examples/device.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/device.rs b/examples/device.rs index 8dcff8d..a0dfc26 100644 --- a/examples/device.rs +++ b/examples/device.rs @@ -40,7 +40,9 @@ fn main() -> ! { let mut syst = p.SYST; let mut nvic = p.NVIC; - nvic.enable(Interrupt::EXTI0); + unsafe { + nvic.iser[Interrupt::EXTI0 as usize / 32].write(1 << (Interrupt::EXTI0 as usize % 32)); + } // configure the system timer to wrap around every second syst.set_clock_source(SystClkSource::Core);