File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -404,10 +404,13 @@ fn main() -> ! {
404404
405405 // Unmask the IO_BANK0 IRQ so that the NVIC interrupt controller
406406 // will jump to the interrupt function when the interrupt occurs.
407+ // Then enable interrupts on Core 0.
408+ //
407409 // We do this last so that the interrupt can't go off while
408- // it is in the middle of being configured
410+ // it is in the middle of being configured.
409411 unsafe {
410412 pac:: NVIC :: unmask ( pac:: Interrupt :: IO_IRQ_BANK0 ) ;
413+ cortex_m:: interrupt:: enable ( ) ;
411414 }
412415
413416 // Empty the keyboard FIFO
@@ -835,7 +838,7 @@ impl Hardware {
835838 if INTERRUPT_PENDING . load ( Ordering :: Relaxed ) {
836839 // The IO chip reports 0 for pending, 1 for not pending.
837840 self . interrupts_pending = self . io_read_interrupts ( ) ^ 0xFF ;
838- defmt:: info!( "Interrupts : 0b{:08b}" , self . interrupts_pending) ;
841+ defmt:: info!( "MCP23S17 IRQ pins : 0b{:08b}" , self . interrupts_pending) ;
839842 // Change the debug LEDs so we can see the interrupts
840843 self . irq_count = self . irq_count . wrapping_add ( 1 ) ;
841844 self . set_debug_leds ( ( self . irq_count & 0x0F ) as u8 ) ;
You can’t perform that action at this time.
0 commit comments