RTOS homework 4

Dependencies:   C12832_lcd mbed

Revision:
25:fe4425b11e3c
Parent:
24:fe4e288bbca3
Child:
26:986b539170fc
--- a/main.cpp	Fri Sep 13 04:06:04 2013 +0000
+++ b/main.cpp	Fri Sep 13 04:08:54 2013 +0000
@@ -74,7 +74,10 @@
     InterruptIn  iJoyStickRight (p16);          // joystick right rising edge.
     InterruptIn  iJoyStickCenter(p14);          // 1 if joystick middle pressed.
 
-    DigitalOut  led3(LED1);                     // leftmost LED.
+    DigitalOut   led0(LED4);                    // magnetron enunciator (not magnatron control)
+    DigitalOut   led1(LED3);                    // carousel  enunciator (not carousel  control)
+    DigitalOut   led2(LED2);                    // magnetron CONTROL.
+    DigitalOut   led3(LED1);                    // carousel  CONTROL.
     
     Ticker      tickerMetronome;                // blinking LED.
     Ticker      tickerLCD;                      // display ticker.
@@ -120,6 +123,15 @@
 //==============================================//==============================
     int main(void) 
     {
+    
+    
+    // On reset, indicate a watchdog reset or a pushbutton reset on LED 4 or 3
+    if ((LPC_WDT->WDMOD >> 2) & 1)
+        led0 = 1; else led1 = 1;
+    
+    
+    
+    
       iJoyStickUp.rise   (&ISR_up);             // metronome stop.
       iJoyStickDown.rise (&ISR_down);           // metronome start.