You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
592 B

  1. #include "quantum.h"
  2. #include "333fred.h"
  3. void layer_state_set_rgb(uint32_t state) {
  4. switch (biton32(state)) {
  5. case BASE:
  6. // purple
  7. rgblight_sethsv_noeeprom(210, 255, 20);
  8. break;
  9. case SYMB:
  10. // blue
  11. rgblight_sethsv_noeeprom(191, 255, 20);
  12. break;
  13. case VIM:
  14. // green
  15. rgblight_sethsv_noeeprom(85, 255, 20);
  16. break;
  17. case GAME:
  18. // red
  19. rgblight_sethsv_noeeprom(0, 255, 20);
  20. break;
  21. }
  22. }
  23. void keyboard_post_init_user(void) {
  24. rgblight_enable_noeeprom();
  25. layer_state_set_rgb(1); // Set layer 0 (bit 1) on
  26. }