summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2012-10-21 22:12:36 +0900
committertmk <nobody@nowhere>2012-10-21 22:12:36 +0900
commitedce1d19a6af040df994243e7b6b1851e3eccebc (patch)
tree3f8d385a39979dcabdefea019e9671503cda8eba /common
parent454f7bc71657020d0574e849dad92a14e71230c4 (diff)
Add LED feature to Sun converter
Diffstat (limited to 'common')
-rw-r--r--common/keyboard.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/keyboard.c b/common/keyboard.c
index e973c46d5b..b0e0ed7935 100644
--- a/common/keyboard.c
+++ b/common/keyboard.c
@@ -555,6 +555,7 @@ void keyboard_init(void)
void keyboard_task(void)
{
static matrix_row_t matrix_prev[MATRIX_ROWS];
+ static uint8_t led_status = 0;
matrix_row_t matrix_row = 0;
matrix_row_t matrix_change = 0;
@@ -617,6 +618,12 @@ void keyboard_task(void)
}
}
+ // update LED
+ if (led_status != host_keyboard_leds()) {
+ led_status = host_keyboard_leds();
+ keyboard_set_leds(led_status);
+ }
+
return;
}