Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Button.cpp
- Revision:
- 4:d54859273629
- Parent:
- 3:03aea89f2a5c
diff -r 03aea89f2a5c -r d54859273629 Button.cpp
--- a/Button.cpp Sat May 13 18:15:11 2017 +0000
+++ b/Button.cpp Fri Jul 14 18:22:24 2017 +0000
@@ -20,6 +20,18 @@
#include "Button.h"
+void Button::startInterrupt()
+{
+ _in.rise(Callback<void()>(this, &Button::isrRise));
+ _in.fall(Callback<void()>(this, &Button::isrFall));
+}
+
+void Button::stopInterrupt()
+{
+ _in.rise(NULL);
+ _in.fall(NULL);
+}
+
void Button::isrFall(void)
{
if (_activeState == 0) onPress();