diff options
Diffstat (limited to 'converter/sun_usb/led.c')
| -rw-r--r-- | converter/sun_usb/led.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/converter/sun_usb/led.c b/converter/sun_usb/led.c index 5490ec0c6..48c3f1c2b 100644 --- a/converter/sun_usb/led.c +++ b/converter/sun_usb/led.c | |||
| @@ -16,10 +16,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #include "stdint.h" | 18 | #include "stdint.h" |
| 19 | #include "serial.h" | ||
| 19 | #include "led.h" | 20 | #include "led.h" |
| 20 | 21 | ||
| 21 | 22 | ||
| 22 | void led_set(uint8_t usb_led) | 23 | void led_set(uint8_t usb_led) |
| 23 | { | 24 | { |
| 24 | // not supported now | 25 | uint8_t sun_led = 0; |
| 26 | if (usb_led & (1<<USB_LED_NUM_LOCK)) sun_led |= (1<<0); | ||
| 27 | if (usb_led & (1<<USB_LED_COMPOSE)) sun_led |= (1<<1); | ||
| 28 | if (usb_led & (1<<USB_LED_SCROLL_LOCK)) sun_led |= (1<<2); | ||
| 29 | if (usb_led & (1<<USB_LED_CAPS_LOCK)) sun_led |= (1<<3); | ||
| 30 | |||
| 31 | serial_send(0x0E); | ||
| 32 | serial_send(sun_led); | ||
| 25 | } | 33 | } |
