From f5a28b3084d9188944ea88869a4ee4a05cedfcaf Mon Sep 17 00:00:00 2001 From: Perry Hung Date: Thu, 19 Aug 2010 22:50:32 -0400 Subject: Removed typedef enum for external interrupts, should function. Note that there's no LOW option. --- wirish/ext_interrupts.c | 2 +- wirish/ext_interrupts.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'wirish') 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 -- cgit v1.2.3