Added the pin outs

Dependencies:   mbed mbed-rtos ShiftReg TextLCD

Files at this revision

API Documentation at this revision

Comitter:
thomasmorris
Date:
Thu Apr 11 11:51:16 2019 +0000
Parent:
4:1ef122d47bf3
Child:
6:347c1f441b94
Commit message:
Updated Post function

Changed in this revision

Post/Post.cpp Show annotated file Show diff for this revision Revisions of this file
Setup.hpp Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Post/Post.cpp	Thu Apr 11 11:37:39 2019 +0000
+++ b/Post/Post.cpp	Thu Apr 11 11:51:16 2019 +0000
@@ -1,14 +1,31 @@
 #include "Post.hpp"
 POWER POWER_1(PA_10,PA_11,PB_0,PB_1);
 INTERFACE INTERFACE_1;
+SCHEDULES SCHEDULES_1;
 void POST()
 {
     if(POWER_1.Post() == 1)//Success
     {
         PC.printf("POWER Post pass\n");   
     }
+    else if(POWER_1.Post() != 1)//Fail
+    {
+        PC.printf("Power Post fail\n");   
+    }
     if(INTERFACE_1.Post() == 1)//Success
     {
         PC.printf("Interface Post pass\n");   
     }
+    else if(INTERFACE_1.Post() != 1)//Fail
+    {
+        PC.printf("Interface Post fail\n");   
+    }
+    if(SCHEDULES_1.Post() == 1)//Success
+    {
+        PC.printf("Schedules Post Pass\n");   
+    }
+    else if (SCHEDULES_1.Post() != 1)//Fail
+    {
+        PC.printf("Schedules Post fail\n");   
+    }
 }
\ No newline at end of file
--- a/Setup.hpp	Thu Apr 11 11:37:39 2019 +0000
+++ b/Setup.hpp	Thu Apr 11 11:51:16 2019 +0000
@@ -20,6 +20,7 @@
 //Class instances
 extern POWER POWER_1;
 extern INTERFACE INTERFACE_1;
+extern SCHEDULES SCHEDULES_1;
 //ShiftReg SR1(PA_12, PA_11, PA_10);    //data, store, clock
 
 static Thread Serial_Thread;
--- a/main.cpp	Thu Apr 11 11:37:39 2019 +0000
+++ b/main.cpp	Thu Apr 11 11:51:16 2019 +0000
@@ -1,20 +1,20 @@
 #include "Setup.hpp"
 
-DigitalOut myled(PC_13);
+DigitalOut myled(PC_13);//Needed to access definition of the led from the main
 void Serial_Function(){INTERFACE_1.Serial();}//Written inside the interface class and Serial function
 void LCD_Function(){INTERFACE_1.LCD();}//LCD output
-void Onboard_Led(){while(1){myled = !myled; Thread::wait(1000);}}
-void Schedules_Function(){/*SCHEDULES.Schedules_output();*/}//Fix this
+void Onboard_Led(){while(1){myled = !myled; Thread::wait(1000);}}//Blink an onboard LED to signal the board is operational
+void Schedules_Function(){SCHEDULES_1.Schedules_output();}//Output shcedules data
 int main()
 {   
     POST();//Run Power on self test
+    //Thread Start up
     Serial_Thread.start(Serial_Function);
     LCD_Thread.start(LCD_Function);
     LED_Thread.start(Onboard_Led);
     Schedules_Thread.start(Schedules_Function);
     while(1)
     {
-        myled = 1; // LED is ON
-        Thread::wait(500);
+        Thread::signal_wait(1);//Sleep the main thread
     }
 }