aboutsummaryrefslogtreecommitdiffstats
path: root/boards/base/RaspberryPi/FreeRTOS/interrupts.h
diff options
context:
space:
mode:
Diffstat (limited to 'boards/base/RaspberryPi/FreeRTOS/interrupts.h')
-rw-r--r--boards/base/RaspberryPi/FreeRTOS/interrupts.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/boards/base/RaspberryPi/FreeRTOS/interrupts.h b/boards/base/RaspberryPi/FreeRTOS/interrupts.h
new file mode 100644
index 00000000..d09353a4
--- /dev/null
+++ b/boards/base/RaspberryPi/FreeRTOS/interrupts.h
@@ -0,0 +1,25 @@
+/**
+ * Tiny Interrupt Manager
+ *
+ * @author James Walmsley <james@fullfat-fs.co.uk>
+ * This code is licensed under the GNU GPLv3 license.
+ **/
+
+#ifndef _INTERRUPTS_H_
+#define _INTERRUPTS_H_
+
+typedef void (*FN_INTERRUPT_HANDLER)(int nIRQ, void *pParam);
+
+typedef struct {
+ FN_INTERRUPT_HANDLER pfnHandler; ///< Function that handles this IRQn
+ void *pParam; ///< A special parameter that the use can pass to the IRQ.
+} INTERRUPT_VECTOR;
+
+int InitInterruptController ();
+int RegisterInterrupt (int nIRQ, FN_INTERRUPT_HANDLER pfnHandler, void *pParam);
+int EnableInterrupt (int nIRQ);
+int DisableInterrupt (int nIRQ);
+int EnableInterrupts ();
+int DisableInterrupts ();
+
+#endif