Fix device example
This commit is contained in:
@@ -40,7 +40,9 @@ fn main() -> ! {
|
|||||||
let mut syst = p.SYST;
|
let mut syst = p.SYST;
|
||||||
let mut nvic = p.NVIC;
|
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
|
// configure the system timer to wrap around every second
|
||||||
syst.set_clock_source(SystClkSource::Core);
|
syst.set_clock_source(SystClkSource::Core);
|
||||||
|
|||||||
Reference in New Issue
Block a user