qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

think65v3.c (627B)


      1 // Copyright 2023 Yizhen Liu (@edwardslau)
      2 // SPDX-License-Identifier: GPL-2.0
      3 #include "quantum.h"
      4 const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
      5     {0,6, HSV_WHITE}
      6 );     
      7 const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
      8     my_capslock_layer
      9 );
     10 
     11 void keyboard_post_init_kb(void) {
     12     // Enable the LED layers
     13     rgblight_layers = my_rgb_layers;
     14     keyboard_post_init_user();
     15 }
     16 bool led_update_kb(led_t led_state) {
     17     bool res = led_update_user(led_state);
     18     if (res) {
     19         rgblight_set_layer_state(0, led_state.caps_lock);
     20     }
     21     return res;
     22 }