Upon an interrupt, you can read from the interrupt status register to see what caused the interrupt.
13 lines
156 B
C
13 lines
156 B
C
#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 |