University of Plymouth - Stages 1, 2 and 3
/
Task611-mbedos54
updated for mbed os 5.4
Diff: main.cpp
- Revision:
- 1:cbcb7c2d43cd
- Parent:
- 0:e48f4ddb9393
diff -r e48f4ddb9393 -r cbcb7c2d43cd main.cpp --- a/main.cpp Thu Mar 30 12:39:47 2017 +0000 +++ b/main.cpp Fri Sep 20 15:10:15 2019 +0000 @@ -21,7 +21,8 @@ { while (true) { redLED = !redLED; - Thread::wait(2000); + ThisThread::sleep_for(2000); + //Thread::wait(2000); //Deprecated } } @@ -29,7 +30,8 @@ { while (true) { yellowLED = !yellowLED; - Thread::wait(1000); + ThisThread::sleep_for(1000); + //Thread::wait(1000); //Deprecated } } @@ -44,7 +46,8 @@ while(1) { //Thread::wait(osWaitForever); - Thread::wait(5000); + //Thread::wait(5000); //Deprecated + ThisThread::sleep_for(5000); printf("Awake\n"); //Should not happen } }