homework 7
Dependencies: mbed-rtos mbed C12832_lcd LM75B
Diff: main.cpp
- Revision:
- 118:d0e057d79acc
- Parent:
- 117:b9e18163c282
- Child:
- 119:e14b0f6e97cb
--- a/main.cpp Thu Sep 12 22:04:23 2013 +0000 +++ b/main.cpp Thu Sep 12 22:07:38 2013 +0000 @@ -82,6 +82,8 @@ { char cControl; // countdown control. char cBeepEnable; // beep control. + char cMagnetron; // magnetron blink control. + char cCarousel; // carousel blink control. int dTotalTime; // initialize to this. int dRemainingTime; // the countdown value. }; @@ -549,6 +551,8 @@ led1 = 0; giButtons.cDoorOpen = 0; // initialize with door closed. giRemainingTime.cBeepEnable =0; + giRemainingTime.cMagnetron = 0; + giRemainingTime.cCarousel = 0; } /*----------------------------------------------//----------------------------*/ void ISRleftButtonRising(void) // cooktime plus 60s. @@ -795,19 +799,18 @@ } } /*----------------------------------------------//----------------------------*/ - void tickerMagnetron(void) + void tickerMagnetron(void) // magnetron enunciator. { - - + if (giRemainingTime.cMagnetron) led0 = !led0; + else led0 = 0; } /*----------------------------------------------//----------------------------*/ - void tickerCarousel(void) + void tickerCarousel(void) // carousel enunciator. { - - + if (giRemainingTime.cCarousel) led1 = !led1; + else led1 = 0; } - /*----------------------------------------------//----------------------------*/