aboutsummaryrefslogtreecommitdiff
path: root/include/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'include/cpu')
-rw-r--r--include/cpu/irq.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/cpu/irq.h b/include/cpu/irq.h
index 1879707..c5e59bb 100644
--- a/include/cpu/irq.h
+++ b/include/cpu/irq.h
@@ -1,6 +1,19 @@
#ifndef CPU_IRQ_H
#define CPU_IRQ_H
+#define UART_IRQ 0
+#define SYS_TIMER_0_IRQ 1
+#define SYS_TIMER_1_IRQ 2
+#define SYS_TIMER_2_IRQ 3
+#define SYS_TIMER_3_IRQ 4
+#define LOCAL_TIMER_IRQ 5
+#define MAX_IRQS LOCAL_TIMER_IRQ+1
+
+struct IrqEntry {
+ void* handler;
+ void* handler_info;
+};
+
static inline void enableirq(void)
{
asm volatile("cpsie i");
@@ -20,5 +33,6 @@ static inline void disablefiq(void)
unsigned long c_irq_handler(void);
unsigned long c_fiq_handler(void);
+void subscribe_irq(unsigned long irq_num, void* handler, void* handler_info);
#endif