1
0
Fork 0

Unconditionally call led_init_ports (#12116)

* Unconditionally call led_init_ports

* Another call to led_init_ports
This commit is contained in:
Joel Challis 2021-08-03 18:34:32 +01:00 committed by GitHub
parent 2bc7511b9e
commit 3f419dc872
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 20 additions and 215 deletions

View file

@ -10,6 +10,10 @@
#define MATRIX_ROWS 8
#define MATRIX_COLS 14
#define LED_NUM_LOCK_PIN D0
#define LED_CAPS_LOCK_PIN D1
#define LED_SCROLL_LOCK_PIN D6
#define RGBLED_NUM 8
#define RGBLIGHT_ANIMATIONS
#define RGBLIGHT_SLEEP

View file

@ -1,25 +1 @@
#include "split75.h"
#include "i2c_master.h"
void keyboard_pre_init_kb(void) {
led_init_ports();
keyboard_pre_init_user();
}
void led_init_ports(void) {
setPinOutput(NUMLOCK_LED_PIN);
setPinOutput(CAPSLOCK_LED_PIN);
setPinOutput(SCROLLLOCK_LED_PIN);
}
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
writePin(NUMLOCK_LED_PIN, led_state.num_lock);
writePin(CAPSLOCK_LED_PIN, led_state.caps_lock);
writePin(SCROLLLOCK_LED_PIN, led_state.scroll_lock);
}
return res;
}

View file

@ -45,7 +45,3 @@
{ K06, K16, K26, K36, K46, KC_NO, KC_NO, KC_NO, K86, K96, KC_NO, K116, K126, K136 }, \
{ K07, K17, K27, K37, K47, KC_NO, KC_NO, KC_NO, K87, K97, K107, K117, K127, K137 } \
}
#define NUMLOCK_LED_PIN D0
#define CAPSLOCK_LED_PIN D1
#define SCROLLLOCK_LED_PIN D6