Change RGB/LED Matrix to use a simple define for USB suspend (#12697)
This commit is contained in:
parent
7409f03cbf
commit
d8167779cd
9 changed files with 62 additions and 53 deletions
|
@ -1,18 +1,18 @@
|
|||
/* Copyright 2020 mt<704340378@qq.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/>.
|
||||
*/
|
||||
*
|
||||
* 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 QMK_KEYBOARD_H
|
||||
|
||||
|
||||
|
@ -44,12 +44,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
|
||||
void rgb_matrix_indicators_user(void) {
|
||||
led_t led_state = host_keyboard_led_state();
|
||||
if (!g_suspend_state) {
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case _FN:
|
||||
rgb_matrix_set_color(77,0xFF, 0x80, 0x00);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (led_state.caps_lock) {
|
||||
rgb_matrix_set_color(46, 0xFF, 0xFF, 0xFF);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue