The unified diff between revisions [8760ae92..] and [23a3e9a5..] is displayed below. It can also be downloaded as a raw diff.

This diff has been restricted to the following files: 'interrupt.h'

#
# old_revision [8760ae9232295422550b79f09e55122390704b3c]
# new_revision [23a3e9a50b4034343e3bd217d2c225dcaec064dd]
#
# add_file "interrupt.h"
#  content [3735115d09df71f1da6b5ed670f9df7c4aafb82c]
#
============================================================
--- /dev/null	
+++ interrupt.h	3735115d09df71f1da6b5ed670f9df7c4aafb82c
@@ -0,0 +1,51 @@
+#ifndef __INTERRUPT_H
+#define __INTERRUPT_H
+
+#include "swi.h"
+
+#define VICVectAddr (*(volatile unsigned int *)0xFFFFF030)
+
+#define I_WDT		0
+
+#define I_ARMCore0	2
+#define I_ARMCore1	3
+#define I_TIMER0	4
+#define I_TIMER1	5
+#define I_UART0		6
+#define I_UART1		7
+
+#define I_I2C0		9
+#define I_SPI0		10
+#define I_SPI1		11
+#define I_SSP		11
+#define I_PLL		12
+#define I_RTC		13
+#define I_EINT0		14
+#define I_EINT1		15
+#define I_EINT2		16
+
+#define I_AD0		18
+#define I_I2C1		19
+
+#define I_TIMER2	26
+#define I_TIMER3	27
+
+/* Assign interrupt priorities here to avoid clashes */
+
+#define I_PRIORITY_I2C0		0
+#define I_PRIORITY_UART0	1
+#define I_PRIORITY_TIMER0	2
+
+#define interrupt_clear() do { VICVectAddr = 0xff; } while (0)
+
+void init_interrupt(void);
+void interrupt_register_code(unsigned int source, unsigned int priority,
+			void(*handler)(void));
+
+#define interrupt_register(x, fn) \
+	interrupt_register_code(I_##x, I_PRIORITY_##x, fn)
+
+#define interrupt_block() swi_call(SWI_INTERRUPT_BLOCK)
+#define interrupt_unblock() swi_call(SWI_INTERRUPT_UNBLOCK)
+
+#endif /* __INTERRUPT_H */