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);