From: tmk Date: Thu, 2 Mar 2017 05:04:13 +0000 (+0900) Subject: fc660c: Add LED support X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=472a60c40d32469197c168b8ec488e85c6efaa4f;p=max%2Ftmk_keyboard.git fc660c: Add LED support --- diff --git a/keyboard/fc660c/fc660c.c b/keyboard/fc660c/fc660c.c index 2d63cdee..62698850 100644 --- a/keyboard/fc660c/fc660c.c +++ b/keyboard/fc660c/fc660c.c @@ -44,7 +44,7 @@ static matrix_row_t _matrix1[MATRIX_ROWS]; void matrix_init(void) { -#if 1 +#if 0 debug_enable = true; debug_keyboard = true; debug_matrix = true; @@ -52,6 +52,10 @@ void matrix_init(void) KEY_INIT(); + // LEDs on CapsLock and Insert + DDRB |= (1<<6) | (1<<7); + PORTB |= (1<<6) | (1<<7); + // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix0[i] = 0x00; for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix1[i] = 0x00; @@ -128,6 +132,8 @@ matrix_row_t matrix_get_row(uint8_t row) void led_set(uint8_t usb_led) { if (usb_led & (1<