Example of watchdog with poor coverage

Fork of Watchdog_sample_fail by William Marsh

Files at this revision

API Documentation at this revision

Comitter:
WilliamMarshQMUL
Date:
Wed Mar 11 08:46:57 2020 +0000
Parent:
6:8b0ca28c88a4
Commit message:
Update mbed library and delay 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
diff -r 8b0ca28c88a4 -r e49685bca7c7 main.cpp
--- a/main.cpp	Wed Feb 27 15:54:07 2019 +0000
+++ b/main.cpp	Wed Mar 11 08:46:57 2020 +0000
@@ -70,9 +70,9 @@
 // -----------------------------------------------
 void timer_thread() {  // method to run in thread
     while (true) {
-        wait(1.0) ;
+        ThisThread::sleep_for(1000) ;
         signals.set(ON1 | ON2) ;
-        wait(1.0) ;
+        ThisThread::sleep_for(1000) ;
         signals.set(OFF1 | OFF2) ;
         // waitButton() ; // POSSIBLE FAULT HERE
     }
@@ -98,7 +98,11 @@
     
     // show start-up
     led_red = OFF;
-    wait(5.0) ;
+    ThisThread::sleep_for(5000) ;
     led_red = ON;
-    // main thread terminates
+    
+    // main thread does nothing more
+    while (true) {
+        ThisThread::sleep_for(10000) ;
+    }
 }
\ No newline at end of file
diff -r 8b0ca28c88a4 -r e49685bca7c7 mbed-os.lib
--- a/mbed-os.lib	Wed Feb 27 15:54:07 2019 +0000
+++ b/mbed-os.lib	Wed Mar 11 08:46:57 2020 +0000
@@ -1,1 +1,1 @@
-https://github.com/armmbed/mbed-os/#51d55508e8400b60af467005646c4e2164738d48
+https://github.com/armmbed/mbed-os/#c12b433026beae5b3b769c27941bc6d7fe5d4b27