summaryrefslogtreecommitdiff
path: root/keyboard/hhkb_rn42/rn42/rn42.c
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2014-09-22 14:20:49 +0900
committertmk <nobody@nowhere>2014-09-22 14:20:49 +0900
commitbfd2d969b48eb2f381137383c6262b60e03cf5b1 (patch)
treeeac3531c090ec37fe58e416157642927b3c30aa9 /keyboard/hhkb_rn42/rn42/rn42.c
parent2015027da325e9f9b602af1f36ceeeebbcd6c78d (diff)
Add keyboard LED control via Bluetooth
Diffstat (limited to 'keyboard/hhkb_rn42/rn42/rn42.c')
-rw-r--r--keyboard/hhkb_rn42/rn42/rn42.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/keyboard/hhkb_rn42/rn42/rn42.c b/keyboard/hhkb_rn42/rn42/rn42.c
index bdffad7667..1565b4cf14 100644
--- a/keyboard/hhkb_rn42/rn42/rn42.c
+++ b/keyboard/hhkb_rn42/rn42/rn42.c
@@ -101,7 +101,9 @@ bool rn42_linked(void)
}
-static uint8_t keyboard_leds(void) { return 0; }
+static uint8_t leds = 0;
+static uint8_t keyboard_leds(void) { return leds; }
+void rn42_set_leds(uint8_t l) { leds = l; }
static void send_keyboard(report_keyboard_t *report)
{
@@ -199,7 +201,7 @@ host_driver_t rn42_config_driver = {
config_send_consumer
};
-static uint8_t config_keyboard_leds(void) { return 0; }
+static uint8_t config_keyboard_leds(void) { return leds; }
static void config_send_keyboard(report_keyboard_t *report) {}
static void config_send_mouse(report_mouse_t *report) {}
static void config_send_system(uint16_t data) {}