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 events_ex_1 by
Revision 4:18e37cfe2fa1, committed 2018-03-08
- Comitter:
- rafalmag
- Date:
- Thu Mar 08 23:04:59 2018 +0000
- Parent:
- 3:f3c40f098a11
- Commit message:
- fixed compiler warnings
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed-os.lib | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Mar 06 23:46:03 2018 +0000 +++ b/main.cpp Thu Mar 08 23:04:59 2018 +0000 @@ -3,6 +3,7 @@ DigitalOut led1(LED1); +Thread thread; InterruptIn button1(USER_BUTTON); volatile bool button1_pressed = false; // Used in the main loop @@ -27,7 +28,7 @@ } } -void led_thread(void const *args) +void led_thread() { while (true) { if(button1.read()==1) { @@ -46,8 +47,8 @@ button1.mode(PullUp); // Activate pull-up button1.fall(callback(button1_onEvent_cb)); // Attach ISR to handle button press event button1.rise(callback(button1_onEvent_cb)); // Attach ISR to handle button rise event - - Thread thread(led_thread); + Thread thread; + thread.start(led_thread); int idx = 0; // Just for printf below
--- a/mbed-os.lib Tue Mar 06 23:46:03 2018 +0000 +++ b/mbed-os.lib Thu Mar 08 23:04:59 2018 +0000 @@ -1,1 +1,1 @@ -https://github.com/ARMmbed/mbed-os/#c9e63f14085f5751ff5ead79a7c0382d50a813a2 +https://github.com/ARMmbed/mbed-os/#5f6572179d66ce4c09d6517b659ac51133cc980d