From 9a938eecbd2b70c970992583b5c16da717d8e254 Mon Sep 17 00:00:00 2001 From: tmk Date: Sun, 13 Feb 2011 00:15:51 +0900 Subject: host interface for pjrc --- keyboard.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'keyboard.c') 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); +} -- cgit v1.2.3