Mike Moore / Mbed 2 deprecated RTOS_HW_07

Dependencies:   mbed-rtos mbed C12832_lcd LM75B

Revision:
25:99745cd186ce
Parent:
24:d39516e077ea
Child:
26:bff592483cb1
diff -r d39516e077ea -r 99745cd186ce main.cpp
--- a/main.cpp	Mon Sep 09 02:19:39 2013 +0000
+++ b/main.cpp	Mon Sep 09 02:32:23 2013 +0000
@@ -26,7 +26,18 @@
       char cSlowClock;                          // slow-clock.
       char cSlowClockRE;                        // slow-clock rising-edge.
       
-    
+      char cLeftButton;                         // cooktime +60S.
+      char cRightButton;                        // cooktime -60S.
+      char cTopButton;                          // start cook.
+      char cBottomButton;                       // stop cook.
+      char cCenterButton;                       // door toggle.
+ 
+      char cLeftButtonRE;                       // rising-edge.
+      char cRightButtonRE;                      // rising-edge.
+      char cTopButtonRE;                        // rising-edge.
+      char cBottomButtonRE;                     // rising-edge.
+      char cCenterButtonRE;                     // rising-edge.
+      
     
     };
 //--global_variables----------------------------//------------------------------ 
@@ -176,39 +187,105 @@
     {
 
       
-      pD[2].cSlowClock   = pD[1].cSlowClock;
-      pD[2].cSlowClockRE = pD[1].cSlowClockRE;
+      pD[2].cLeftButton      = pD[1].cLeftButton;
+      pD[2].cRightButton     = pD[1].cRightButton;      
+      pD[2].cTopButton       = pD[1].cTopButton;      
+      pD[2].cBottomButton    = pD[1].cBottomButton;      
+      pD[2].cCenterButton    = pD[1].cCenterButton;  
+      pD[2].cSlowClock       = pD[1].cSlowClock;    
+      
+      pD[2].cLeftButtonRE    = pD[1].cLeftButtonRE;
+      pD[2].cRightButtonRE   = pD[1].cRightButtonRE;      
+      pD[2].cTopButtonRE     = pD[1].cTopButtonRE;      
+      pD[2].cBottomButtonRE  = pD[1].cBottomButtonRE;      
+      pD[2].cCenterButtonRE  = pD[1].cCenterButtonRE;   
+      pD[2].cSlowClockRE     = pD[1].cSlowClockRE;
 
     }
 /*----------------------------------------------//----------------------------*/
     void segment_3(pipeData * pD)               // pipeline segment 3 logic.
     {
-      pD[3].cSlowClock   = pD[2].cSlowClock;
-      pD[3].cSlowClockRE = pD[2].cSlowClockRE;
+      pD[3].cLeftButton      = pD[2].cLeftButton;
+      pD[3].cRightButton     = pD[2].cRightButton;      
+      pD[3].cTopButton       = pD[2].cTopButton;      
+      pD[3].cBottomButton    = pD[2].cBottomButton;      
+      pD[3].cCenterButton    = pD[2].cCenterButton;  
+      pD[3].cSlowClock       = pD[2].cSlowClock;    
+      
+      pD[3].cLeftButtonRE    = pD[2].cLeftButtonRE;
+      pD[3].cRightButtonRE   = pD[2].cRightButtonRE;      
+      pD[3].cTopButtonRE     = pD[2].cTopButtonRE;      
+      pD[3].cBottomButtonRE  = pD[2].cBottomButtonRE;      
+      pD[3].cCenterButtonRE  = pD[2].cCenterButtonRE;   
+      pD[3].cSlowClockRE     = pD[2].cSlowClockRE;
     }
 /*----------------------------------------------//----------------------------*/
     void segment_4(pipeData * pD)               // pipeline segment 4 logic.
     {
-      pD[4].cSlowClock   = pD[3].cSlowClock;
-      pD[4].cSlowClockRE = pD[3].cSlowClockRE;
+      pD[4].cLeftButton      = pD[3].cLeftButton;
+      pD[4].cRightButton     = pD[3].cRightButton;      
+      pD[4].cTopButton       = pD[3].cTopButton;      
+      pD[4].cBottomButton    = pD[3].cBottomButton;      
+      pD[4].cCenterButton    = pD[3].cCenterButton;  
+      pD[4].cSlowClock       = pD[3].cSlowClock;    
+      
+      pD[4].cLeftButtonRE    = pD[3].cLeftButtonRE;
+      pD[4].cRightButtonRE   = pD[3].cRightButtonRE;      
+      pD[4].cTopButtonRE     = pD[3].cTopButtonRE;      
+      pD[4].cBottomButtonRE  = pD[3].cBottomButtonRE;      
+      pD[4].cCenterButtonRE  = pD[3].cCenterButtonRE;   
+      pD[4].cSlowClockRE     = pD[3].cSlowClockRE;
     }
 /*----------------------------------------------//----------------------------*/
     void segment_5(pipeData * pD)               // pipeline segment 5 logic.
     {
-      pD[5].cSlowClock   = pD[4].cSlowClock;
-      pD[5].cSlowClockRE = pD[4].cSlowClockRE;
+      pD[5].cLeftButton      = pD[4].cLeftButton;
+      pD[5].cRightButton     = pD[4].cRightButton;      
+      pD[5].cTopButton       = pD[4].cTopButton;      
+      pD[5].cBottomButton    = pD[4].cBottomButton;      
+      pD[5].cCenterButton    = pD[4].cCenterButton;  
+      pD[5].cSlowClock       = pD[4].cSlowClock;    
+      
+      pD[5].cLeftButtonRE    = pD[4].cLeftButtonRE;
+      pD[5].cRightButtonRE   = pD[4].cRightButtonRE;      
+      pD[5].cTopButtonRE     = pD[4].cTopButtonRE;      
+      pD[5].cBottomButtonRE  = pD[4].cBottomButtonRE;      
+      pD[5].cCenterButtonRE  = pD[4].cCenterButtonRE;   
+      pD[5].cSlowClockRE     = pD[4].cSlowClockRE;
     }
 /*----------------------------------------------//----------------------------*/
     void segment_6(pipeData * pD)               // pipeline segment 6 logic.
     {
-      pD[6].cSlowClock   = pD[5].cSlowClock;
-      pD[6].cSlowClockRE = pD[5].cSlowClockRE;
+      pD[6].cLeftButton      = pD[5].cLeftButton;
+      pD[6].cRightButton     = pD[5].cRightButton;      
+      pD[6].cTopButton       = pD[5].cTopButton;      
+      pD[6].cBottomButton    = pD[5].cBottomButton;      
+      pD[6].cCenterButton    = pD[5].cCenterButton;  
+      pD[6].cSlowClock       = pD[5].cSlowClock;    
+      
+      pD[6].cLeftButtonRE    = pD[5].cLeftButtonRE;
+      pD[6].cRightButtonRE   = pD[5].cRightButtonRE;      
+      pD[6].cTopButtonRE     = pD[5].cTopButtonRE;      
+      pD[6].cBottomButtonRE  = pD[5].cBottomButtonRE;      
+      pD[6].cCenterButtonRE  = pD[5].cCenterButtonRE;   
+      pD[6].cSlowClockRE     = pD[5].cSlowClockRE;
     }
 /*----------------------------------------------//----------------------------*/
     void segment_7(pipeData * pD)               // pipeline segment 7 logic.
     {
-      pD[7].cSlowClock   = pD[6].cSlowClock;
-      pD[7].cSlowClockRE = pD[6].cSlowClockRE;
+      pD[7].cLeftButton      = pD[6].cLeftButton;
+      pD[7].cRightButton     = pD[6].cRightButton;      
+      pD[7].cTopButton       = pD[6].cTopButton;      
+      pD[7].cBottomButton    = pD[6].cBottomButton;      
+      pD[7].cCenterButton    = pD[6].cCenterButton;  
+      pD[7].cSlowClock       = pD[6].cSlowClock;    
+      
+      pD[7].cLeftButtonRE    = pD[6].cLeftButtonRE;
+      pD[7].cRightButtonRE   = pD[6].cRightButtonRE;      
+      pD[7].cTopButtonRE     = pD[6].cTopButtonRE;      
+      pD[7].cBottomButtonRE  = pD[6].cBottomButtonRE;      
+      pD[7].cCenterButtonRE  = pD[6].cCenterButtonRE;   
+      pD[7].cSlowClockRE     = pD[6].cSlowClockRE;
       
 
     }