diff options
author | Christian Cunningham <cc@localhost> | 2022-03-24 16:44:51 -0700 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2022-03-24 16:44:51 -0700 |
commit | 49bd4c133fc83de1cb1761ff089a2de03699d991 (patch) | |
tree | 1033663698e3651d0fdbc6773c6a3db8261ae3c3 /include/cpu | |
parent | bb6ddd5a82ab4f2afa253b6048a71504c64274bb (diff) |
IRQ Subscription
Diffstat (limited to 'include/cpu')
-rw-r--r-- | include/cpu/irq.h | 14 |
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 |