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:
Byron Lathi
2022-03-14 13:30:01 -05:00
parent e012eb7d4d
commit a5474b5ae5
5 changed files with 46 additions and 1 deletions

13
sw/interrupt.h Normal file
View 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