All tasks complete

Dependencies:   mbed MCP23017 mbed-rtos WattBob_TextLCD

Revision:
14:25241ed5b056
Parent:
12:f4052a23ddc7
Child:
16:b66cb760fb3b
diff -r 822b0e56ea68 -r 25241ed5b056 main.cpp
--- a/main.cpp	Wed Mar 27 16:05:51 2019 +0000
+++ b/main.cpp	Wed Apr 03 02:49:34 2019 +0000
@@ -19,6 +19,8 @@
 MCP23017            *par_port; // pointer to 16-bit parallel I/O object **was = NULL
 WattBob_TextLCD     *display; // pointer to 2*16 chacater LCD object **was = NULL
 
+
+//Thread delcaration 
 Thread thread_1;
 Thread thread_2;
 Thread thread_3;
@@ -30,11 +32,17 @@
 Thread thread_9;
 Thread thread_10;
 
+//mail queue
+Thread MailQueue;
 
+//Mutex
 Mutex simuXS;
 Mutex speedXS;
 Mutex carstateXS;
 
+//mailbox
+Mail<SIMU_DATA, 16> mail_box;
+
 int main() {  
 
     // set up for the LCD
@@ -45,6 +53,7 @@
     
     par_port->write_bit(1,BL_BIT); // turn LCD backlight ON
     
+    //task initialization 
     
     thread_1.start(task1readbrake);
     thread_2.start(task2readaccel);
@@ -56,13 +65,16 @@
     thread_8.start(task8sidelights);
     thread_9.start(task9indLED);
     thread_10.start(taskXserialdump);
+    
+    //mail queue
+    MailQueue.start(callback(send_thread));
 
 
    
 
 
   
-while(1){
+    while(true){
             
         }
 }
\ No newline at end of file