abc
Dependents: Microwave_MBED MicrowaveSimulation_LPC1768 RTOS_Alarm_Clock USB_Project_Host ... more
Diff: DebouncedInterrupt.h
- Revision:
- 17:96a51b236ba0
- Parent:
- 16:7eaa188de0f9
--- a/DebouncedInterrupt.h Tue Feb 18 20:22:31 2014 +0000 +++ b/DebouncedInterrupt.h Tue Feb 18 20:38:50 2014 +0000 @@ -15,7 +15,7 @@ * * int main() * { - * up_button.attach(&onUp, INT_FALL, 100); + * up_button.attach(&onUp, 100); * while(1) { * ... * } @@ -29,11 +29,6 @@ #include <stdint.h> #include "mbed.h" -enum interruptTrigger{ - INT_FALL = 0, - INT_RISE = 1 -}; - class DebouncedInterrupt { private: unsigned int _debounce_us; @@ -52,7 +47,7 @@ ~DebouncedInterrupt(); // Start monitoring the interupt and attach a callback - void attach(void (*fptr)(void), const interruptTrigger& trigger=INT_FALL, const uint32_t& debounce_ms=10); + void attach(void (*fptr)(void), const uint32_t& debounce_ms=10); // Stop monitoring the interrupt void reset();