aboutsummaryrefslogtreecommitdiffstats
path: root/src/wiring/ext_interrupts.h
diff options
context:
space:
mode:
authoriperry <iperry@749a229e-a60e-11de-b98f-4500b42dc123>2009-12-17 02:37:07 +0000
committeriperry <iperry@749a229e-a60e-11de-b98f-4500b42dc123>2009-12-17 02:37:07 +0000
commit32e57dac2e61e79b029593eb4d34d727bcc10678 (patch)
tree98d7ff41993576bb150d13d5f63dc744f6812852 /src/wiring/ext_interrupts.h
downloadlibrambutan-32e57dac2e61e79b029593eb4d34d727bcc10678.tar.gz
librambutan-32e57dac2e61e79b029593eb4d34d727bcc10678.zip
Initial commit of library code, moved from leaftest repo
git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@69 749a229e-a60e-11de-b98f-4500b42dc123
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
+