homework 7

Dependencies:   mbed-rtos mbed C12832_lcd LM75B

Files at this revision

API Documentation at this revision

Comitter:
gatedClock
Date:
Thu Sep 12 21:02:00 2013 +0000
Parent:
102:5735d9cbad00
Child:
104:5e49dbe5038a
Commit message:
cleanup. removed speakerThread.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu Sep 12 20:57:35 2013 +0000
+++ b/main.cpp	Thu Sep 12 21:02:00 2013 +0000
@@ -169,7 +169,7 @@
     
     void temperatureThread(void const *args);   // temperature measurement.
     void LCDthread        (void const *args);   // LCD display thread.
-    void speakerThread(void const *args);       // speaker thread.
+
     void tickerBeeper();                        // beep oscillator.
 //==============================================//==============================
     int main(void) 
@@ -229,7 +229,7 @@
 //     dSeconds = 8;
      
  
-   //   speakerThread((void  *) &dSeconds); 
+
       
       while(1)
       {
@@ -499,7 +499,7 @@
             { 
 
               queueTemperatureControl.put((int *) TEMP_FREEZE,1);
-              Thread thread_beep(&speakerThread,(void *) &dBeepSeconds);
+
               
               gcBeepEnable = 1;
               beepTimer.reset();                // clear the beep timer.
@@ -843,48 +843,14 @@
       
     }                                           // cookRemainingTime.
 /*----------------------------------------------//----------------------------*/
-    
-    void speakerThread(void const * pSecondsBeep) 
+    void tickerBeeper(void)                     // beep when gcBeepEnable is 1.
     {
-      osEvent queueEvent;                       // from button state manager.
-      int     dLoop;
-      int   * pSeconds;
-      int     dSeconds;
-      float   fHalfSecond;                      // cycles per half-second.
-      
-  /*    
-      pSeconds = (int *) pSecondsBeep;
-      dSeconds = *pSeconds;
- //     dSeconds = 2;
-      
-      fHalfSecond = 0.5 / (float) BEEPFREQ;
- 
-      for (dLoop = 0; dLoop < (dSeconds * BEEPFREQ); dLoop++)
-      {
-        speaker = 1;
-        wait(fHalfSecond);
-        speaker = 0;
-        wait(fHalfSecond);
-      }
-  */  
-    
-    }
-/*----------------------------------------------//----------------------------*/
-    void tickerBeeper(void)
-    {
-    
-  
-      
-    
       static char cState = 0;
       if (gcBeepEnable)
       {
         if (cState) {speaker = 1; cState = 0;}
         else        {speaker = 0; cState = 1;}
-      
-      
       }
-      
     }
 /*----------------------------------------------//----------------------------*/