Migrate led_update_kb
implementations to DD (#23983)
This commit is contained in:
parent
17498fa48a
commit
7824e7ed9b
52 changed files with 111 additions and 660 deletions
|
@ -16,21 +16,9 @@
|
|||
#include "quantum.h"
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
gpio_set_pin_output(C6);
|
||||
gpio_set_pin_output(B0);
|
||||
}
|
||||
|
||||
bool led_update_kb(led_t led_state) {
|
||||
bool res = led_update_user(led_state);
|
||||
if (res) {
|
||||
// gpio_write_pin sets the pin high for 1 and low for 0.
|
||||
// In this example the pins are inverted, setting
|
||||
// it low/0 turns it on, and high/1 turns the LED off.
|
||||
// This behavior depends on whether the LED is between the pin
|
||||
// and VCC or the pin and GND.
|
||||
gpio_write_pin(C6, !led_state.caps_lock);
|
||||
}
|
||||
return res;
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
|
|
|
@ -8,6 +8,10 @@
|
|||
"pid": "0x4447",
|
||||
"device_version": "0.0.1"
|
||||
},
|
||||
"indicators": {
|
||||
"caps_lock": "C6",
|
||||
"on_state": 0
|
||||
},
|
||||
"matrix_pins": {
|
||||
"cols": ["F4", "F0", "B7", "B3", "B2", "B1", "D5", "D3", "D2"],
|
||||
"rows": ["E6", "F1", "C7", "F7", "F6"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue