aboutsummaryrefslogtreecommitdiffstats
path: root/src/wiring/ext_interrupts.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wiring/ext_interrupts.h')
-rw-r--r--src/wiring/ext_interrupts.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/wiring/ext_interrupts.h b/src/wiring/ext_interrupts.h
new file mode 100644
index 0000000..d6fb23f
--- /dev/null
+++ b/src/wiring/ext_interrupts.h
@@ -0,0 +1,31 @@
+#ifndef _EXT_INTERRUPTS_H_
+#define _EXT_INTERRUPTS_H_
+
+#include "exti.h"
+
+#define RISING EXTI_RISING
+#define FALLING EXTI_FALLING
+#define CHANGE EXTI_RISING_FALLING
+
+
+enum ExtInterruptError {
+ EXT_INTERRUPT_INVALID_PIN = (-1),
+ EXT_INTERRUPT_INVALID_FUNCTION = (-2),
+ EXT_INTERRUPT_INVALID_MODE = (-3),
+
+};
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+int attachInterrupt(uint8_t, void ((*)(void)), uint8_t);
+int detachInterrupt(uint8_t);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
+