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.
Dependencies: aconno_I2C Lis2dh12 WatchdogTimer
Diff: common.cpp
- Revision:
- 9:b0a1535b8ef2
- Parent:
- 7:e9a19750700d
- Child:
- 33:760005331b4c
--- a/common.cpp Tue Dec 11 22:38:25 2018 +0000
+++ b/common.cpp Sat Dec 15 13:45:28 2018 +0000
@@ -8,7 +8,8 @@
void LED1on(long milliseconds = 0) {
led1 = 0;
if (milliseconds > 0) {
- ThisThread::sleep_for(milliseconds);
+ //ThisThread::sleep_for(milliseconds);
+ Thread::wait(milliseconds);
led1 = 1;
}
}
@@ -16,9 +17,11 @@
for (int i = 0; i < (count*2); i++) {
led1 = !led1;
if (milliseconds > 0) {
- ThisThread::sleep_for(milliseconds);
+ Thread::wait(milliseconds);
+ //ThisThread::sleep_for(milliseconds);
} else {
- ThisThread::sleep_for(100); //default if 0 provided
+ Thread::wait(100);
+ //ThisThread::sleep_for(100); //default if 0 provided
}
}
led1 = 1;