rev2.c 813 B

1234567891011121314151617181920212223242526272829303132
  1. #include "quefrency.h"
  2. #include "split_util.h"
  3. void matrix_init_kb(void) {
  4. setPinOutput(CAPS_LOCK_LED_PIN);
  5. matrix_init_user();
  6. }
  7. bool led_update_kb(led_t led_state) {
  8. // Only update if left half
  9. if (isLeftHand && led_update_user(led_state)) {
  10. writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock);
  11. }
  12. return true;
  13. }
  14. void eeconfig_init_kb(void) {
  15. #ifdef BACKLIGHT_ENABLE
  16. backlight_enable();
  17. backlight_level(3);
  18. #endif
  19. #ifdef RGBLIGHT_ENABLE
  20. rgblight_enable(); // Enable RGB by default
  21. rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness
  22. #ifdef RGBLIGHT_ANIMATIONS
  23. rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default
  24. #endif
  25. #endif
  26. eeconfig_update_kb(0);
  27. eeconfig_init_user();
  28. }