diff options
Diffstat (limited to 'wirish')
-rw-r--r-- | wirish/ext_interrupts.c | 2 | ||||
-rw-r--r-- | wirish/ext_interrupts.h | 8 |
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 |