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 digitalInInterrupt_sample by
Revision 5:dd7d8fb1ad75, committed 2018-02-02
- Comitter:
- cvmanuel
- Date:
- Fri Feb 02 18:21:27 2018 +0000
- Parent:
- 4:5af35f086ddd
- Commit message:
- interrupts solution;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Feb 01 17:13:53 2018 +0000 +++ b/main.cpp Fri Feb 02 18:21:27 2018 +0000 @@ -17,8 +17,8 @@ volatile int pressEvent = 0 ; volatile int pressEvent2 = 0 ; - bool pressed1 = false; - bool pressed2 = false; +volatile bool pressed1 = false; +volatile bool pressed2 = false; // This function is invoked when then interrupt occurs // Signal that the button has been pressed @@ -58,6 +58,6 @@ if(!pressed2) { led2= !led2; } - Thread::wait(2000) ; + Thread::wait(500) ; } } \ No newline at end of file