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
|
@ -1,20 +0,0 @@
|
|||
#include "quantum.h"
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
gpio_set_pin_output(INDICATOR_PIN_0);
|
||||
gpio_set_pin_output(INDICATOR_PIN_1);
|
||||
gpio_set_pin_output(INDICATOR_PIN_2);
|
||||
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
|
||||
bool led_update_kb(led_t led_state) {
|
||||
bool runDefault = led_update_user(led_state);
|
||||
if (runDefault) {
|
||||
gpio_write_pin(INDICATOR_PIN_0, !led_state.num_lock);
|
||||
gpio_write_pin(INDICATOR_PIN_1, !led_state.caps_lock);
|
||||
gpio_write_pin(INDICATOR_PIN_2, !led_state.scroll_lock);
|
||||
}
|
||||
return runDefault;
|
||||
}
|
|
@ -26,10 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#define WS2812_SPI_SCK_PAL_MODE 0
|
||||
#define WS2812_SPI_SCK_PIN B13
|
||||
|
||||
#define INDICATOR_PIN_0 A0
|
||||
#define INDICATOR_PIN_1 A1
|
||||
#define INDICATOR_PIN_2 A2
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
|
|
|
@ -15,6 +15,11 @@
|
|||
"resync": true
|
||||
}
|
||||
},
|
||||
"indicators": {
|
||||
"caps_lock": "A1",
|
||||
"num_lock": "A0",
|
||||
"scroll_lock": "A2"
|
||||
},
|
||||
"rgblight": {
|
||||
"led_count": 14,
|
||||
"animations": {
|
||||
|
|
|
@ -26,10 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#define WS2812_SPI_SCK_PAL_MODE 0
|
||||
#define WS2812_SPI_SCK_PIN B13
|
||||
|
||||
#define INDICATOR_PIN_0 A9
|
||||
#define INDICATOR_PIN_1 A8
|
||||
#define INDICATOR_PIN_2 B12
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
|
|
|
@ -15,6 +15,11 @@
|
|||
"resync": true
|
||||
}
|
||||
},
|
||||
"indicators": {
|
||||
"caps_lock": "A8",
|
||||
"num_lock": "A9",
|
||||
"scroll_lock": "B12"
|
||||
},
|
||||
"rgblight": {
|
||||
"led_count": 14,
|
||||
"animations": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue