mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-17 21:22:05 +00:00
Apply suggestions from code review
Co-authored-by: Joel Challis <git@zvecr.com>
This commit is contained in:
parent
4d7418e030
commit
d80119dfe4
@ -4,12 +4,4 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define F_CPU 72000000
|
||||
|
||||
#define LED_NUM_LOCK_PIN B8
|
||||
#define LED_CAPS_LOCK_PIN B9
|
||||
#define LED_SCROLL_LOCK_PIN B10
|
||||
|
||||
#define IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
|
||||
|
||||
#define RGB_MATRIX_DISABLE_SHARED_KEYCODES
|
||||
|
@ -24,7 +24,12 @@
|
||||
"pid": "0xA33E",
|
||||
"device_version": "1.0.6"
|
||||
},
|
||||
|
||||
"indicators": {
|
||||
"caps_lock": "B9",
|
||||
"num_lock": "B8",
|
||||
"scroll_lock": "B10",
|
||||
"on_state": 0
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT_fullsize_ansi": {
|
||||
"layout": [
|
||||
@ -250,7 +255,6 @@
|
||||
{"matrix": [7, 12], "x": 214, "y": 64, "flags": 4}
|
||||
],
|
||||
"animations": {
|
||||
"solid_color": true,
|
||||
"alphas_mods": true,
|
||||
"gradient_up_down": true,
|
||||
"gradient_left_right": true,
|
||||
|
@ -3,7 +3,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "config.h"
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = {
|
||||
@ -113,21 +112,8 @@ const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = {
|
||||
{0, SW8_CS38, SW8_CS39, SW8_CS37}
|
||||
};
|
||||
#endif
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
gpio_set_pin_output(LED_CAPS_LOCK_PIN);
|
||||
gpio_set_pin_output(LED_NUM_LOCK_PIN);
|
||||
gpio_set_pin_output(LED_SCROLL_LOCK_PIN);
|
||||
|
||||
gpio_set_pin_output(B11); // Required for indicators to work correctly
|
||||
}
|
||||
|
||||
bool led_update_kb(led_t led_state) {
|
||||
bool res = led_update_user(led_state);
|
||||
if(res) {
|
||||
gpio_write_pin(LED_NUM_LOCK_PIN, !led_state.num_lock);
|
||||
gpio_write_pin(LED_CAPS_LOCK_PIN, !led_state.caps_lock);
|
||||
gpio_write_pin(LED_SCROLL_LOCK_PIN, !led_state.scroll_lock);
|
||||
}
|
||||
return res;
|
||||
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user