]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/bigswitch/bigswitch.c
3cc11e602676a396a8d7c299c7e79637fdc40487
[qmk_firmware.git] / keyboards / bigswitch / bigswitch.c
1 /*
2 Copyright 2018 QMK Contributors
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 */
17 #include "bigswitch.h"
18
19 volatile uint8_t runonce = true;
20 static uint16_t my_timer;
21
22 void matrix_init_user(void) {
23   my_timer = timer_read();
24 }
25
26 void matrix_scan_user(void) {
27   if (runonce && timer_elapsed(my_timer) > 1000) {
28     runonce = false;
29     rgblight_sethsv(0x0, 0xff, 0x80);
30     rgblight_mode(9);
31     rgblight_enable();
32   }
33 }