homework 7

Dependencies:   mbed-rtos mbed C12832_lcd LM75B

Revision:
117:b9e18163c282
Parent:
116:15084f54baf9
Child:
118:d0e057d79acc
--- a/main.cpp	Thu Sep 12 21:51:53 2013 +0000
+++ b/main.cpp	Thu Sep 12 22:04:23 2013 +0000
@@ -127,6 +127,8 @@
     Ticker       tickerButtonStateManager;      // manage the button states.
     Ticker       tickerCookCountdown;           // remaining cook time.      
     Ticker       tickerBeep;                    // beeper ticker. 
+    Ticker       tickerBlinkMagnetron;          // magnetron LED blinker.
+    Ticker       tickerBlinkCarousel;           // caroulsel LED blinker.
 //-------prototypes-----------------------------//------------------------------
 
     void slowClock();                           // 1Hz or thereabouts.
@@ -154,6 +156,8 @@
     void LCDthread        (void const *args);   // LCD display thread.
 
     void tickerBeeper();                        // beep oscillator.
+    void tickerMagnetron();                     // blink magnetron LED.
+    void tickerCarousel();                      // blink carousel LED.
 //==============================================//==============================
     int main(void) 
     {
@@ -182,6 +186,8 @@
                                                 // kick-off tickers.
       tickerCookCountdown.attach_us(&tickCookRemainingTime,1000000/GRANULARITY);
       tickerBeep.attach_us         (&tickerBeeper         ,2000);     
+      tickerBlinkMagnetron.attach_us(&tickerMagnetron,250000);
+      tickerBlinkCarousel.attach_us(&tickerCarousel,250000);
       
                                                 // kick-off threads.
       Thread thread_1(temperatureThread       ,NULL,osPriorityIdle,DEFAULT_STACK_SIZE,NULL);
@@ -779,7 +785,7 @@
       
     }                                           // cookRemainingTime.
 /*----------------------------------------------//----------------------------*/
-    void tickerBeeper(void)                     // beep when giRemainingTime.cBeepEnable is 1.
+    void tickerBeeper(void)                     // beep when giRemainingTime.
     {
       static char cState = 0;
       if (giRemainingTime.cBeepEnable)
@@ -789,4 +795,35 @@
       }
     }
 /*----------------------------------------------//----------------------------*/
+    void tickerMagnetron(void)
+    {
+    
+    
+    }
 
+/*----------------------------------------------//----------------------------*/
+    void tickerCarousel(void)
+    {
+    
+    
+    }
+
+/*----------------------------------------------//----------------------------*/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+