forked from forks/qmk_firmware
0477160109
* initialise rpneko65, info.json * force NKRO * define WS2812 stuff and capitalise RPNeko65 * use RGBlight, add ANSI to keymap.c also remove _ADC suffixes from pins * basic readme plus making it so the info.json RGB values are actually recognised as integers * update repository URL * fix info.json formatting * caps lock LED implementation "borrowed" from waffling60 * put RGBLIGHT_ENABLE in json also remove "pin" from the rgblight option * add actually correct keymaps also reformat info.json * move to designer folder, add image to README * move keyboard to separate revision folder and remove erroneous tag from config.h * remove brightness/hue/saturation steps * change device version to 1.0 * move quantum.h include to top * actually, let's try a new image I also forgot to save the info.json file beforehand oops * Remove comma in info.json * Community layouts in info.json * Delete rpneko65/readme.md * Apply suggested changes to readme * Suggested code changes * Suggested imgur link * rename code file this was the issue all along sigh * Correct layer matching this time * Move Enter in info.json * README/info.json change * Another batch of suggestions
35 lines
1.1 KiB
C
35 lines
1.1 KiB
C
/*
|
|
Copyright 2022 Stefan Sundin "4pplet" <mail@4pplet.com>
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
#include "quantum.h"
|
|
|
|
bool led_update_kb(led_t led_state) {
|
|
bool res = led_update_user(led_state);
|
|
if (CAPS_LOCK_ENABLE && res) {
|
|
if(led_state.caps_lock) {
|
|
#ifdef CAPS_LOCK_COLOR
|
|
rgblight_sethsv_at(CAPS_LOCK_COLOR, 0);
|
|
#else
|
|
rgblight_sethsv_at(rgblight_get_hue(),rgblight_get_sat(),rgblight_get_val(), 0);
|
|
#endif
|
|
}
|
|
else{
|
|
rgblight_sethsv_at(HSV_BLACK, 0);
|
|
}
|
|
}
|
|
return res;
|
|
}
|