diff options
Diffstat (limited to 'keyboards/clueboard/rev2')
-rw-r--r-- | keyboards/clueboard/rev2/config.h | 5 | ||||
-rw-r--r-- | keyboards/clueboard/rev2/rev2.c | 16 | ||||
-rw-r--r-- | keyboards/clueboard/rev2/rev2.h | 2 |
3 files changed, 19 insertions, 4 deletions
diff --git a/keyboards/clueboard/rev2/config.h b/keyboards/clueboard/rev2/config.h index e2f8336beb..02982ff299 100644 --- a/keyboards/clueboard/rev2/config.h +++ b/keyboards/clueboard/rev2/config.h @@ -29,9 +29,8 @@ /* Underlight configuration */ -#define ws2812_PORTREG PORTD -#define ws2812_DDRREG DDRD -#define ws2812_pin 7 +#define RGB_DI_PIN D7 +#define RGBLIGHT_TIMER #define RGBLED_NUM 14 // Number of LEDs #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 diff --git a/keyboards/clueboard/rev2/rev2.c b/keyboards/clueboard/rev2/rev2.c index 7a8ec368e6..1a35b87b84 100644 --- a/keyboards/clueboard/rev2/rev2.c +++ b/keyboards/clueboard/rev2/rev2.c @@ -45,3 +45,19 @@ void backlight_set(uint8_t level) { PORTD &= ~(1<<4); // Arrows } } + +void led_init_ports() { + // * Set our LED pins as output + DDRB |= (1<<4); +} + +void led_set_kb(uint8_t usb_led) { + DDRB |= (1<<4); + if (usb_led & (1<<USB_LED_CAPS_LOCK)) { + // Turn capslock on + PORTB |= (1<<4); + } else { + // Turn capslock off + PORTB &= ~(1<<4); + } +} diff --git a/keyboards/clueboard/rev2/rev2.h b/keyboards/clueboard/rev2/rev2.h index 912de405da..2e9cb9dc2e 100644 --- a/keyboards/clueboard/rev2/rev2.h +++ b/keyboards/clueboard/rev2/rev2.h @@ -13,7 +13,7 @@ * |------------------------------------------------------------. * | 30| 31| 32| 33| 34| 35| 36| 37| 80| 81| 82| 83| 84| 85|86| * |------------------------------------------------------------------. - * | 40| 41| 42| 43| 45| 46| 90| 91| 92| 93| 94| 95| 96| + * | 40| 41| 42| 43| 45| 46| 90| 92| 93| 94| 95| 96| 97| * `------------------------------------------------------------------' * ,-----------------------------------------------------------. ,---. * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Yen| BS| |Ins| |