led_test_init.c 440 B

1234567891011121314151617181920
  1. #include QMK_KEYBOARD_H
  2. #if 1
  3. void led_test_init(void) {
  4. static int scan_count = 0;
  5. if( scan_count == 2 ) {
  6. rgblight_enable_noeeprom();
  7. rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST);
  8. }
  9. if( scan_count < 3 ) scan_count ++;
  10. }
  11. #else
  12. // when qmk/qmk_firmware PullRequest #3113 available.
  13. // can use this?
  14. void startup_user(void) {
  15. rgblight_enable_noeeprom();
  16. rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST);
  17. }
  18. #endif