Implement interrupt status register
Upon an interrupt, you can read from the interrupt status register to see what caused the interrupt.
This commit is contained in:
13
sw/interrupt.h
Normal file
13
sw/interrupt.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#ifndef _INTERRUPT_H
|
||||
#define _INTERRUPT_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define BUTTON (1 << 0)
|
||||
|
||||
void irq_int();
|
||||
void nmi_int();
|
||||
|
||||
uint8_t irq_get_status();
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user