*/
#include "bigswitch.h"
+volatile uint8_t runonce = true;
+static uint16_t my_timer;
+
+__attribute__ ((weak))
void matrix_init_user(void) {
- rgblight_enable();
- rgblight_mode(9);
+ my_timer = timer_read();
+}
+
+__attribute__ ((weak))
+void matrix_scan_user(void) {
+#if defined(RGBLIGHT_ENABLE)
+ if (runonce && timer_elapsed(my_timer) > 1000) {
+ runonce = false;
+ rgblight_sethsv_noeeprom(0x0, 0xff, 0x80);
+ rgblight_mode_noeeprom(9);
+ rgblight_enable_noeeprom();
+ }
+#endif
}