Solution to the deadlock problem

Fork of Task617Solution-mbedos54 by Nicholas Outram

Files at this revision

API Documentation at this revision

Comitter:
noutram
Date:
Tue Oct 31 15:40:25 2017 +0000
Parent:
6:d16ce38e9b8a
Commit message:
updated for stage-3

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	Mon Apr 03 11:38:04 2017 +0000
+++ b/main.cpp	Tue Oct 31 15:40:25 2017 +0000
@@ -6,19 +6,14 @@
 
 #define DELAY 200
 
-//Digital outputs
 DigitalOut onBoardLED(LED1);
-DigitalOut redLED(D7);
-DigitalOut yellowLED(D6);
-DigitalOut greenLED(D5);
+DigitalOut redLED(PE_15);
+DigitalOut yellowLED(PB_10);
+DigitalOut greenLED(PB_11);
 
-//Serial Interface
-Serial pc(USBTX, USBRX);
-
-//Digital inputs
 DigitalIn  onBoardSwitch(USER_BUTTON);
-DigitalIn  SW1(D4);
-DigitalIn  SW2(D3);
+DigitalIn  SW1(PE_12);
+DigitalIn  SW2(PE_14);
 
 //Thread ID for the Main function (CMSIS API)
 osThreadId tidMain;
@@ -31,7 +26,7 @@
 
 void thread1() 
 {
-    pc.printf("Entering thread 1\n");
+    printf("Entering thread 1\n");
     while (true) {
         yellowLED = 1;
         
@@ -59,7 +54,7 @@
 
 void thread2() 
 {
-    pc.printf("Entering thread 2\n");  
+    printf("Entering thread 2\n");  
     while (true) {
         redLED = 1;
         
@@ -102,7 +97,7 @@
     t1.start(thread1);
     t2.start(thread2);
     
-    pc.printf("Main Thread\n");
+    printf("Main Thread\n");
     while (true) {
         Thread::wait(osWaitForever);
     }
--- a/mbed-os.lib	Mon Apr 03 11:38:04 2017 +0000
+++ b/mbed-os.lib	Tue Oct 31 15:40:25 2017 +0000
@@ -1,1 +1,1 @@
-https://github.com/ARMmbed/mbed-os/#50b3418e45484ebf442b88cd935a2d5355402d7d
+https://github.com/ARMmbed/mbed-os/#e62a1b9236b44e70ae3b0902dc538481c04d455b