aboutsummaryrefslogtreecommitdiffstats
path: root/wirish
diff options
context:
space:
mode:
authorPerry Hung <iperry@alum.mit.edu>2010-08-19 22:50:32 -0400
committerPerry Hung <iperry@alum.mit.edu>2010-08-19 22:50:32 -0400
commitf5a28b3084d9188944ea88869a4ee4a05cedfcaf (patch)
tree2ec4e07fab639e9961a0573188cfbe52a73d558b /wirish
parent5f11e12d66ce65e8be2b695ece6f35c2889d2aa2 (diff)
downloadlibrambutan-f5a28b3084d9188944ea88869a4ee4a05cedfcaf.tar.gz
librambutan-f5a28b3084d9188944ea88869a4ee4a05cedfcaf.zip
Removed typedef enum for external interrupts, should function. Note
that there's no LOW option.
Diffstat (limited to 'wirish')
-rw-r--r--wirish/ext_interrupts.c2
-rw-r--r--wirish/ext_interrupts.h8
2 files changed, 5 insertions, 5 deletions
diff --git a/wirish/ext_interrupts.c b/wirish/ext_interrupts.c
index 54b8be9..1fa50fe 100644
--- a/wirish/ext_interrupts.c
+++ b/wirish/ext_interrupts.c
@@ -65,7 +65,7 @@ static ExtiInfo PIN_TO_EXTI_CHANNEL[NR_MAPLE_PINS] = {
*
* @sideeffect Registers a handler
*/
-int attachInterrupt(uint8 pin, voidFuncPtr handler, ExtInterruptTriggerMode mode) {
+int attachInterrupt(uint8 pin, voidFuncPtr handler, uint32 mode) {
uint8 outMode;
/* Parameter checking */
if (pin >= NR_MAPLE_PINS) {
diff --git a/wirish/ext_interrupts.h b/wirish/ext_interrupts.h
index fc69a15..7449685 100644
--- a/wirish/ext_interrupts.h
+++ b/wirish/ext_interrupts.h
@@ -31,14 +31,14 @@
#ifndef _EXT_INTERRUPTS_H_
#define _EXT_INTERRUPTS_H_
-typedef enum ExtInterruptTriggerMode {
+enum {
RISING,
FALLING,
CHANGE
-} ExtInterruptTriggerMode;
+};
-enum ExtInterruptError {
+enum {
EXT_INTERRUPT_INVALID_PIN = (-1),
EXT_INTERRUPT_INVALID_FUNCTION = (-2),
EXT_INTERRUPT_INVALID_MODE = (-3),
@@ -48,7 +48,7 @@ enum ExtInterruptError {
extern "C"{
#endif
-int attachInterrupt(uint8 pin, voidFuncPtr, ExtInterruptTriggerMode mode);
+int attachInterrupt(uint8 pin, voidFuncPtr, uint32 mode);
int detachInterrupt(uint8 pin);
#ifdef __cplusplus