Migrate led_update_kb implementations to DD (#23981)

This commit is contained in:
Joel Challis 2024-06-22 12:14:07 +01:00 committed by GitHub
parent cb39df273d
commit 17498fa48a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
45 changed files with 94 additions and 658 deletions

View file

@ -20,6 +20,9 @@
"resync": true
}
},
"indicators": {
"caps_lock": "F1"
},
"matrix_pins": {
"cols": ["B7", "B0", "F5", "D5", "B1", "B2", "B3", "D3", "D2", "C7", "C6", "B6", "B5", "B4", "D7", "D6", "D4"],
"rows": ["F0", "E6", "F4", "F6", "F7"]

View file

@ -1,30 +0,0 @@
/* Copyright 2018 Jason Williams (Wilba)
*
* 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"
void keyboard_pre_init_kb(void) {
gpio_set_pin_output(F1);
keyboard_pre_init_user();
}
bool led_update_kb(led_t led_state) {
if (led_update_user(led_state)) {
gpio_write_pin(F1, led_state.caps_lock);
}
return true;
}

View file

@ -8,6 +8,9 @@
"pid": "0x001F",
"device_version": "0.0.1"
},
"indicators": {
"caps_lock": "F1"
},
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,

View file

@ -17,19 +17,6 @@
bool g_first_execution = false;
void keyboard_pre_init_kb(void) {
gpio_set_pin_output(F1);
keyboard_pre_init_user();
}
bool led_update_kb(led_t led_state) {
if (led_update_user(led_state)) {
gpio_write_pin(F1, led_state.caps_lock);
}
return true;
}
// This is some magic so that PCBs flashed with VIA firmware at the factory
// will start with an RGB test pattern. Not relevant for non-VIA firmware.
#ifdef VIA_ENABLE