summaryrefslogtreecommitdiff
path: root/keyboards/mechlovin/adelais/rgb_led/rev3
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/mechlovin/adelais/rgb_led/rev3')
-rw-r--r--keyboards/mechlovin/adelais/rgb_led/rev3/config.h3
-rw-r--r--keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c30
2 files changed, 18 insertions, 15 deletions
diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/config.h b/keyboards/mechlovin/adelais/rgb_led/rev3/config.h
index e16d5f2ce5..65a189b9de 100644
--- a/keyboards/mechlovin/adelais/rgb_led/rev3/config.h
+++ b/keyboards/mechlovin/adelais/rgb_led/rev3/config.h
@@ -51,12 +51,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// 0b1110110 AD <-> SDA
#define DRIVER_ADDR_1 0b0110010
#define DRIVER_COUNT 1
-#define DRIVER_LED_TOTAL 66
+#define RGB_MATRIX_LED_COUNT 66
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
#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
#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c b/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c
index d9ea7993cf..ad9c7c4db0 100644
--- a/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c
+++ b/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c
@@ -17,7 +17,7 @@
#include "rev3.h"
#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] = {
{0, CS3_SW5, CS2_SW5, CS1_SW5}, /* D9-K31-00 */
{0, CS6_SW5, CS5_SW5, CS4_SW5}, /* D46-K00-01 */
{0, CS6_SW9, CS5_SW9, CS4_SW9}, /* D59-K01-02 */
@@ -78,7 +78,7 @@ const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
{0, CS21_SW8, CS20_SW8, CS19_SW8}, /* D109-K3B-56 */
{0, CS24_SW2, CS23_SW2, CS22_SW2}, /* D105-K3D-57 */
{0, CS24_SW8, CS23_SW8, CS22_SW8}, /* D103-K3E-58 */
-
+
{0, CS3_SW1, CS2_SW1, CS1_SW1}, /* D163-K40-59 */
{0, CS6_SW1, CS5_SW1, CS4_SW1}, /* D147-K42-60 */
{0, CS9_SW1, CS8_SW1, CS7_SW1}, /* D137-K44-61 */
@@ -101,21 +101,25 @@ led_config_t g_led_config = {
{0,0}, { 17, 0}, { 34, 0 }, { 51, 0 }, { 69, 0}, { 86, 0}, {100, 0}, {103, 0}, { 120, 0}, { 138, 0}, { 155, 0}, { 172, 0}, { 189, 0}, {207, 0}, {215, 0}, {224, 0},
{0,16}, { 17, 16}, { 34,16 }, { 51,16 }, { 69,16}, { 86,16}, {103,16}, { 120,16}, { 138,16}, { 155,16}, { 172,16}, { 189,16}, {207, 16}, {215, 16}, {224,16},
{0,32}, { 17, 32}, { 34,32 }, { 51,32 }, { 69,32}, { 86,32}, {103,32}, { 120,32}, { 138,32}, { 155,32}, { 172,32}, { 189,32}, {207, 32}, {224,32},
- { 17, 48}, { 34,48 }, { 51,48 }, { 69,48}, { 86,48}, {103,48}, { 120,48}, { 138,48}, { 155,48}, { 172,48}, { 189,48}, {207, 48}, {215, 48}, {224,48},
- { 17, 64}, { 51,64 }, { 86,64}, { 103,64}, { 138,64}, { 172,64}, {224, 64},
+ { 17, 48}, { 34,48 }, { 51,48 }, { 69,48}, { 86,48}, {103,48}, { 120,48}, { 138,48}, { 155,48}, { 172,48}, { 189,48}, {207, 48}, {215, 48}, {224,48},
+ { 17, 64}, { 51,64 }, { 86,64}, { 103,64}, { 138,64}, { 172,64}, {224, 64},
}, {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- }
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1,
+ }
};
-__attribute__((weak)) void rgb_matrix_indicators_user(void) {
- if (host_keyboard_led_state().caps_lock) {
- rgb_matrix_set_color(32, 255, 255, 255);
- }
+bool rgb_matrix_indicators_kb(void) {
+ if (!rgb_matrix_indicators_user()) {
+ return false;
+ }
+ if (host_keyboard_led_state().caps_lock) {
+ rgb_matrix_set_color(32, 255, 255, 255);
+ }
+ return true;
}