Apply suggestions from code review

Co-authored-by: Joel Challis <git@zvecr.com>
This commit is contained in:
aedanmills 2025-06-11 19:16:36 -04:00 committed by GitHub
parent 4d7418e030
commit d80119dfe4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 26 deletions

View File

@ -4,12 +4,4 @@
#pragma once #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 IS31FL3741_I2C_ADDRESS_1 IS31FL3741_I2C_ADDRESS_GND
#define RGB_MATRIX_DISABLE_SHARED_KEYCODES

View File

@ -24,7 +24,12 @@
"pid": "0xA33E", "pid": "0xA33E",
"device_version": "1.0.6" "device_version": "1.0.6"
}, },
"indicators": {
"caps_lock": "B9",
"num_lock": "B8",
"scroll_lock": "B10",
"on_state": 0
},
"layouts": { "layouts": {
"LAYOUT_fullsize_ansi": { "LAYOUT_fullsize_ansi": {
"layout": [ "layout": [
@ -250,7 +255,6 @@
{"matrix": [7, 12], "x": 214, "y": 64, "flags": 4} {"matrix": [7, 12], "x": 214, "y": 64, "flags": 4}
], ],
"animations": { "animations": {
"solid_color": true,
"alphas_mods": true, "alphas_mods": true,
"gradient_up_down": true, "gradient_up_down": true,
"gradient_left_right": true, "gradient_left_right": true,

View File

@ -3,7 +3,6 @@
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H
#include "config.h"
#ifdef RGB_MATRIX_ENABLE #ifdef RGB_MATRIX_ENABLE
const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = { 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} {0, SW8_CS38, SW8_CS39, SW8_CS37}
}; };
#endif #endif
void keyboard_pre_init_kb(void) { 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 gpio_set_pin_output(B11); // Required for indicators to work correctly
}
bool led_update_kb(led_t led_state) { keyboard_pre_init_user();
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;
} }