led_RGB
Low_device.cpp
- Committer:
- ht
- Date:
- 2016-02-27
- Revision:
- 0:bd903d88d2c8
- Child:
- 1:06b34a8b0554
File content as of revision 0:bd903d88d2c8:
#include "Low_device.h" #include "mbed.h" Low_device::Low_device() { } 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; }