summaryrefslogtreecommitdiff
path: root/keyboards/mechlovin/delphine
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/mechlovin/delphine')
-rw-r--r--keyboards/mechlovin/delphine/rgb_led/config.h3
-rw-r--r--keyboards/mechlovin/delphine/rgb_led/rgb_led.c28
2 files changed, 17 insertions, 14 deletions
diff --git a/keyboards/mechlovin/delphine/rgb_led/config.h b/keyboards/mechlovin/delphine/rgb_led/config.h
index 0d5bfb57f9..155d526f3f 100644
--- a/keyboards/mechlovin/delphine/rgb_led/config.h
+++ b/keyboards/mechlovin/delphine/rgb_led/config.h
@@ -31,10 +31,9 @@
// 0b1110110 AD <-> SDA
#define DRIVER_ADDR_1 0b1110110
#define DRIVER_COUNT 1
-#define DRIVER_LED_TOTAL 25
+#define RGB_MATRIX_LED_COUNT 25
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
-#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
diff --git a/keyboards/mechlovin/delphine/rgb_led/rgb_led.c b/keyboards/mechlovin/delphine/rgb_led/rgb_led.c
index 413a9a06ea..3e02735cdf 100644
--- a/keyboards/mechlovin/delphine/rgb_led/rgb_led.c
+++ b/keyboards/mechlovin/delphine/rgb_led/rgb_led.c
@@ -18,7 +18,7 @@
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
// left CA
{0, C5_2, C6_2, C7_2}, //D2-0
{0, C1_1, C3_2, C4_2}, //D20-1
@@ -60,12 +60,12 @@ led_config_t g_led_config = { {
},
{
//LED Index to Physical Positon
- { 0, 0}, { 75, 0}, {149, 0}, {224, 0},
- { 0, 13}, { 75, 13}, {149, 13}, {224, 13},
- { 0, 25}, { 75, 25}, {149, 25}, {224, 25},
- { 0, 38}, { 75, 38}, {149, 38}, {224, 38},
- { 0, 51}, { 75, 51}, {149, 51}, {224, 51},
- { 0, 64}, { 37, 64}, { 75, 64}, {149, 64}, {224, 64},
+ { 0, 0}, { 75, 0}, {149, 0}, {224, 0},
+ { 0, 13}, { 75, 13}, {149, 13}, {224, 13},
+ { 0, 25}, { 75, 25}, {149, 25}, {224, 25},
+ { 0, 38}, { 75, 38}, {149, 38}, {224, 38},
+ { 0, 51}, { 75, 51}, {149, 51}, {224, 51},
+ { 0, 64}, { 37, 64}, { 75, 64}, {149, 64}, {224, 64},
}, {
4, 4, 4, 4,
4, 1, 1, 4,
@@ -75,10 +75,14 @@ led_config_t g_led_config = { {
4, 0, 1, 1, 4,
} };
-void rgb_matrix_indicators_kb(void) {
- if (host_keyboard_led_state().num_lock) {
- rgb_matrix_set_color(4, 255, 255, 255);
- }
+bool rgb_matrix_indicators_kb(void) {
+ if (!rgb_matrix_indicators_user()) {
+ return false;
+ }
+ if (host_keyboard_led_state().num_lock) {
+ rgb_matrix_set_color(4, 255, 255, 255);
+ }
+ return true;
}
__attribute__((weak))
@@ -117,7 +121,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
if (!process_record_user(keycode, record)) { return false; }
-
+
if (record->event.pressed) {
switch(keycode) {
#ifdef RGB_MATRIX_ENABLE