aboutsummaryrefslogtreecommitdiff
path: root/interrupts.c
diff options
context:
space:
mode:
Diffstat (limited to 'interrupts.c')
-rw-r--r--interrupts.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/interrupts.c b/interrupts.c
index 3dc3d6f..79007cb 100644
--- a/interrupts.c
+++ b/interrupts.c
@@ -12,4 +12,14 @@ void __attribute__((interrupt("UNDEF"))) undefined_instruction_vector(void)
{
/* Do Nothing! */
}
+}
+
+__irq void IRQHandler (void)
+{
+ volatile unsigned int *base = (unsigned int *) 0x80000000;
+ if (*base == 1) // which interrupt was it?
+ {
+ uart_putc(*base); // process the interrupt
+ }
+ *(base+1) = 0; // clear the interrupt
} \ No newline at end of file