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.
Fork of Nucleo_read_button_interrupt by
Revision 1:19e910fda737, committed 2016-05-05
- Comitter:
- ittraining
- Date:
- Thu May 05 03:36:22 2016 +0000
- Parent:
- 0:912303e63cbd
- Child:
- 2:4103c09a0f63
- Commit message:
- button interrupt;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Feb 21 12:53:03 2014 +0000
+++ b/main.cpp Thu May 05 03:36:22 2016 +0000
@@ -5,17 +5,20 @@
float delay = 1.0; // 1 sec
-void pressed()
+void pressed_down()
{
if (delay == 1.0)
delay = 0.2; // 200 ms
else
delay = 1.0; // 1 sec
}
+
+
int main()
{
- mybutton.fall(&pressed);
+ // mybutton.fall(&pressed_down);
+ mybutton.rise(&pressed_down);
while (1) {
myled = !myled;
wait(delay);
--- a/mbed.bld Fri Feb 21 12:53:03 2014 +0000 +++ b/mbed.bld Thu May 05 03:36:22 2016 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/ed8466a608b4 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/aae6fcc7d9bb \ No newline at end of file
