led_RGB

Revision:
2:f1ae9529e6ee
Parent:
1:06b34a8b0554
Child:
3:7992dc580716
--- a/Low_device.cpp	Sat Feb 27 05:08:41 2016 +0000
+++ b/Low_device.cpp	Sat Feb 27 09:41:48 2016 +0000
@@ -7,6 +7,8 @@
 DigitalOut  LED_3(P2_14);               /* LED3 on the Motor Drive board */
 DigitalOut  LED_2(P2_15);               /* LED2 on the Motor Drive board */
 
+DigitalIn   user_botton(P6_0);          /* SW1 on the GR-PEACH board */
+DigitalIn   push_sw(P2_13);             /* SW1 on the Motor Drive board */
  
 Low_device::Low_device() {
 }
@@ -25,4 +27,18 @@
     led = ~led;
     LED_3 = led & 0x1;
     LED_2 = ( led >> 1 ) & 0x1;
+}
+
+//PEACH_button_get(on GR-PEACH board)
+//------------------------------------------------------------------//
+unsigned int Low_device::peach_button_get( void )
+{
+    return (~user_botton) & 0x1;        /* Read ports with switches */
+}
+
+//pushsw_get(on Motor drive board)
+//------------------------------------------------------------------//
+unsigned int Low_device::pushsw_get( void )
+{
+    return (~push_sw) & 0x1;            /* Read ports with switches */
 }
\ No newline at end of file