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 Task612-mbedos54 by
Revision 3:de36dab8492f, committed 2019-11-08
- Comitter:
- noutram
- Date:
- Fri Nov 08 10:10:14 2019 +0000
- Parent:
- 2:410eacc3006a
- Commit message:
- 2019 - new API
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:09:33 2017 +0000
+++ b/main.cpp Fri Nov 08 10:10:14 2019 +0000
@@ -24,7 +24,8 @@
void FunctionRed()
{
while (true) {
- Thread::signal_wait(RED_TOGGLE);
+// Thread::signal_wait(RED_TOGGLE); //Now using new API
+ ThisThread::flags_wait_any(RED_TOGGLE);
redLED = !redLED;
}
}
@@ -32,7 +33,8 @@
void FunctionYellow()
{
while (true) {
- Thread::signal_wait(YELLOW_TOGGLE);
+// Thread::signal_wait(YELLOW_TOGGLE);
+ ThisThread::flags_wait_any(YELLOW_TOGGLE);
yellowLED = !yellowLED;
}
}
@@ -40,7 +42,7 @@
void FunctionGreen()
{
while (true) {
- Thread::signal_wait(GREEN_TOGGLE);
+ ThisThread::flags_wait_any(GREEN_TOGGLE);
greenLED = !greenLED;
}
}
@@ -80,15 +82,15 @@
switch (selection) {
case 1:
//Signal thread 1
- t1.signal_set(RED_TOGGLE);
+ t1.flags_set(RED_TOGGLE);
break;
case 2:
//Signal thread 2
- t2.signal_set(YELLOW_TOGGLE);
+ t2.flags_set(YELLOW_TOGGLE);
break;
case 3:
//Signal thread 3
- t3.signal_set(GREEN_TOGGLE);
+ t3.flags_set(GREEN_TOGGLE);
break;
default:
puts("Invalid option");
--- a/mbed-os.lib Tue Oct 31 14:09:33 2017 +0000 +++ b/mbed-os.lib Fri Nov 08 10:10:14 2019 +0000 @@ -1,1 +1,1 @@ -https://github.com/ARMmbed/mbed-os/#e62a1b9236b44e70ae3b0902dc538481c04d455b +https://github.com/ARMmbed/mbed-os/#3a57ec7401a77b8b98f6356a1498cb154229483f
