led_RGB

Revision:
1:06b34a8b0554
Parent:
0:bd903d88d2c8
Child:
2:f1ae9529e6ee
--- a/Low_device.cpp	Sat Feb 27 04:20:33 2016 +0000
+++ b/Low_device.cpp	Sat Feb 27 05:08:41 2016 +0000
@@ -1,16 +1,28 @@
 #include "Low_device.h"
 #include "mbed.h"
  
+DigitalOut  LED_R(P6_13);               /* LED1 on the GR-PEACH board */
+DigitalOut  LED_G(P6_14);               /* LED2 on the GR-PEACH board */
+DigitalOut  LED_B(P6_15);               /* LED3 on the GR-PEACH board */
+DigitalOut  LED_3(P2_14);               /* LED3 on the Motor Drive board */
+DigitalOut  LED_2(P2_15);               /* LED2 on the Motor Drive board */
+
  
 Low_device::Low_device() {
 }
  
+ // RGB LED control
 void Low_device::led_RGB(int led) {
-    DigitalOut  LED_R(P6_13);               /* LED1 on the GR-PEACH board */
-    DigitalOut  LED_G(P6_14);               /* LED2 on the GR-PEACH board */
-    DigitalOut  LED_B(P6_15);               /* LED3 on the GR-PEACH board */
-    
     LED_R = led & 0x1;
     LED_G = (led >> 1 ) & 0x1;
     LED_B = (led >> 2 ) & 0x1;
+}
+
+//led_out(on Motor drive board)
+//------------------------------------------------------------------//
+void Low_device::led_OUT(int led)
+{
+    led = ~led;
+    LED_3 = led & 0x1;
+    LED_2 = ( led >> 1 ) & 0x1;
 }
\ No newline at end of file