A replacement for InterruptIn that debounces the interrupt.
Dependents: D7A_Demo-Get-started CVtoOSCConverter EE3501keypad D7A_Localisation ... more
Fork of DebouncedInterrupt by
Example code:
#include "DebouncedInterrupt.h" DebouncedInterrupt up_button(USER_BUTTON); void onUp() { // Do Something } int main() { // Will immediatly call function and ignore other interrupts until timeout up_button.attach(&onUp, IRQ_FALL, 1000, true); // Will call function only if button has been held for the specified time //up_button.attach(&onUp, IRQ_FALL, 500, false); while(1) {} }
History
Updated deprecated callback.
2017-04-27, by Jeej [Thu, 27 Apr 2017 16:06:12 +0000] rev 26
Updated deprecated callback.
Use mbed callback
2017-04-26, by Jeej [Wed, 26 Apr 2017 11:02:18 +0000] rev 25
Use mbed callback
Cleanup.
2015-11-19, by Jeej [Thu, 19 Nov 2015 17:43:15 +0000] rev 24
Cleanup.
Fixed Timeout bug that appeared on NUCLEO-L152RE (don't know about other platforms) after mbed update.; Added the possibility to trigger the callback immediately at the interrupt.
2015-11-19, by Jeej [Thu, 19 Nov 2015 15:37:39 +0000] rev 23
Fixed Timeout bug that appeared on NUCLEO-L152RE (don't know about other platforms) after mbed update.; Added the possibility to trigger the callback immediately at the interrupt.
Modifications to template version for member functions
2014-02-25, by kandangath [Tue, 25 Feb 2014 23:44:37 +0000] rev 22
Modifications to template version for member functions
Added option to attach to a class member
2014-02-25, by kandangath [Tue, 25 Feb 2014 07:13:29 +0000] rev 21
Added option to attach to a class member
Updated Documentation
2014-02-21, by kandangath [Fri, 21 Feb 2014 16:50:56 +0000] rev 20
Updated Documentation
A bit more code cleanup
2014-02-19, by kandangath [Wed, 19 Feb 2014 03:30:52 +0000] rev 19
A bit more code cleanup
Support checking rise and fall of signals
2014-02-19, by kandangath [Wed, 19 Feb 2014 01:47:45 +0000] rev 18
Support checking rise and fall of signals
Monitor both rising and falling edges
2014-02-18, by kandangath [Tue, 18 Feb 2014 20:38:50 +0000] rev 17
Monitor both rising and falling edges