summaryrefslogtreecommitdiff
path: root/keyboard.c
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2011-02-13 00:15:51 +0900
committertmk <nobody@nowhere>2011-02-22 03:09:05 +0900
commit9a938eecbd2b70c970992583b5c16da717d8e254 (patch)
tree22ac37491f88aa60d917a18696c93f61a429d43c /keyboard.c
parent2b8cd88ab142068eed0a3f230a3de79deb567536 (diff)
host interface for pjrc
Diffstat (limited to 'keyboard.c')
-rw-r--r--keyboard.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/keyboard.c b/keyboard.c
index cb1c745e26..1a025bd01b 100644
--- a/keyboard.c
+++ b/keyboard.c
@@ -13,7 +13,7 @@
#endif
-static uint8_t last_led = 0;
+static uint8_t last_leds = 0;
void keyboard_init(void)
@@ -125,8 +125,13 @@ void keyboard_proc(void)
ps2_mouse_usb_send();
#endif
- if (last_led != host_keyboard_led()) {
- led_set(host_keyboard_led());
- last_led = host_keyboard_led();
+ if (last_leds != host_keyboard_leds()) {
+ keyboard_set_leds(host_keyboard_leds());
+ last_leds = host_keyboard_leds();
}
}
+
+void keyboard_set_leds(uint8_t leds)
+{
+ led_set(leds);
+}