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 Task613-mbedos54 by
Revision 3:168df8bbd41a, committed 2019-11-08
- Comitter:
- noutram
- Date:
- Fri Nov 08 10:43:32 2019 +0000
- Parent:
- 2:feb5f54fe1ed
- Commit message:
- 2019
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 Oct 31 14:19:45 2017 +0000 +++ b/main.cpp Fri Nov 08 10:43:32 2019 +0000 @@ -38,10 +38,10 @@ while (true) { redLED = !redLED; if (redLED == 1) { - t4.signal_set(RED_ON); + t4.flags_set(RED_ON); } - Thread::wait(5100); + ThisThread::sleep_for(5100); } } @@ -50,9 +50,9 @@ while (true) { yellowLED = !yellowLED; if (yellowLED == 1) { - t4.signal_set(YELLOW_ON); + t4.flags_set(YELLOW_ON); } - Thread::wait(1900); + ThisThread::sleep_for(1900); } } @@ -62,9 +62,9 @@ while (true) { greenLED = !greenLED; if (greenLED == 1) { - t4.signal_set(GREEN_ON); + t4.flags_set(GREEN_ON); } - Thread::wait(700); + ThisThread::sleep_for(700); } } @@ -73,11 +73,12 @@ { while (true) { - Thread::signal_wait(RED_ON); +// Thread::signal_wait(RED_ON); + ThisThread::flags_wait_all(RED_ON); printf("Red\n"); - Thread::signal_wait(YELLOW_ON); + ThisThread::flags_wait_all(YELLOW_ON); printf("Yellow\n"); - Thread::signal_wait(GREEN_ON); + ThisThread::flags_wait_all(GREEN_ON); printf("Green\n"); //Signal main thread osSignalSet(idMain, ALL_ON); @@ -101,10 +102,10 @@ //Thread ID - id1 = t1.gettid(); - id2 = t2.gettid(); - id3 = t3.gettid(); - id4 = t4.gettid(); +// id1 = t1.gettid(); +// id2 = t2.gettid(); +// id3 = t3.gettid(); +// id4 = t4.gettid(); while(1) { //Wait for the ALL_ON signal
--- a/mbed-os.lib Tue Oct 31 14:19:45 2017 +0000 +++ b/mbed-os.lib Fri Nov 08 10:43:32 2019 +0000 @@ -1,1 +1,1 @@ -https://github.com/ARMmbed/mbed-os/#e62a1b9236b44e70ae3b0902dc538481c04d455b +https://github.com/ARMmbed/mbed-os/#3a57ec7401a77b8b98f6356a1498cb154229483f