From 7cc90c234f55364bb5ebf45f9bb4274fd9926b9d Mon Sep 17 00:00:00 2001 From: Pete Neisen Date: Wed, 29 Nov 2023 15:38:06 -0700 Subject: Converted RGB matrix to use last_input_activity_elapsed(). (#21687) Co-authored-by: Nick Brassel --- quantum/rgb_matrix/rgb_matrix.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'quantum/rgb_matrix') diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c index d93d189827..ebaf3077dc 100644 --- a/quantum/rgb_matrix/rgb_matrix.c +++ b/quantum/rgb_matrix/rgb_matrix.c @@ -76,9 +76,6 @@ static uint8_t rgb_last_enable = UINT8_MAX; static uint8_t rgb_last_effect = UINT8_MAX; static effect_params_t rgb_effect_params = {0, LED_FLAG_ALL, false}; static rgb_task_states rgb_task_state = SYNCING; -#if RGB_MATRIX_TIMEOUT > 0 -static uint32_t rgb_anykey_timer; -#endif // RGB_MATRIX_TIMEOUT > 0 // double buffers static uint32_t rgb_timer_buffer; @@ -163,9 +160,6 @@ void process_rgb_matrix(uint8_t row, uint8_t col, bool pressed) { #ifndef RGB_MATRIX_SPLIT if (!is_keyboard_master()) return; #endif -#if RGB_MATRIX_TIMEOUT > 0 - rgb_anykey_timer = 0; -#endif // RGB_MATRIX_TIMEOUT > 0 #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED uint8_t led[LED_HITS_TO_REMEMBER]; @@ -246,18 +240,11 @@ static bool rgb_matrix_none(effect_params_t *params) { } static void rgb_task_timers(void) { -#if defined(RGB_MATRIX_KEYREACTIVE_ENABLED) || RGB_MATRIX_TIMEOUT > 0 +#if defined(RGB_MATRIX_KEYREACTIVE_ENABLED) uint32_t deltaTime = sync_timer_elapsed32(rgb_timer_buffer); -#endif // defined(RGB_MATRIX_KEYREACTIVE_ENABLED) || RGB_MATRIX_TIMEOUT > 0 +#endif // defined(RGB_MATRIX_KEYREACTIVE_ENABLED) rgb_timer_buffer = sync_timer_read32(); - // Update double buffer timers -#if RGB_MATRIX_TIMEOUT > 0 - if (rgb_anykey_timer + deltaTime <= UINT32_MAX) { - rgb_anykey_timer += deltaTime; - } -#endif // RGB_MATRIX_TIMEOUT > 0 - // Update double buffer last hit timers #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED uint8_t count = last_hit_buffer.count; @@ -370,7 +357,7 @@ void rgb_matrix_task(void) { // while suspended and just do a software shutdown. This is a cheap hack for now. bool suspend_backlight = suspend_state || #if RGB_MATRIX_TIMEOUT > 0 - (rgb_anykey_timer > (uint32_t)RGB_MATRIX_TIMEOUT) || + (last_input_activity_elapsed() > (uint32_t)RGB_MATRIX_TIMEOUT) || #endif // RGB_MATRIX_TIMEOUT > 0 false; -- cgit v1.2.3 From 24511d31b6fbf92d182d84d97193f65cbbdfeaa4 Mon Sep 17 00:00:00 2001 From: Ryan Date: Fri, 8 Dec 2023 16:54:47 +1100 Subject: LED/RGB Matrix: add header for drivers (#22628) --- quantum/rgb_matrix/rgb_matrix.h | 36 +---------------------------- quantum/rgb_matrix/rgb_matrix_drivers.c | 6 ++++- quantum/rgb_matrix/rgb_matrix_drivers.h | 41 +++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 36 deletions(-) create mode 100644 quantum/rgb_matrix/rgb_matrix_drivers.h (limited to 'quantum/rgb_matrix') diff --git a/quantum/rgb_matrix/rgb_matrix.h b/quantum/rgb_matrix/rgb_matrix.h index 9a3ffb8ea3..b1bf839bf6 100644 --- a/quantum/rgb_matrix/rgb_matrix.h +++ b/quantum/rgb_matrix/rgb_matrix.h @@ -21,31 +21,10 @@ #include #include #include "rgb_matrix_types.h" +#include "rgb_matrix_drivers.h" #include "color.h" #include "keyboard.h" -#if defined(RGB_MATRIX_IS31FL3218) -# include "is31fl3218.h" -#elif defined(RGB_MATRIX_IS31FL3731) -# include "is31fl3731.h" -#elif defined(RGB_MATRIX_IS31FL3733) -# include "is31fl3733.h" -#elif defined(RGB_MATRIX_IS31FL3736) -# include "is31fl3736.h" -#elif defined(RGB_MATRIX_IS31FL3737) -# include "is31fl3737.h" -#elif defined(RGB_MATRIX_IS31FL3741) -# include "is31fl3741.h" -#elif defined(IS31FLCOMMON) -# include "is31flcommon.h" -#elif defined(RGB_MATRIX_SNLED27351) -# include "snled27351.h" -#elif defined(RGB_MATRIX_AW20216S) -# include "aw20216s.h" -#elif defined(RGB_MATRIX_WS2812) -# include "ws2812.h" -#endif - #ifndef RGB_MATRIX_TIMEOUT # define RGB_MATRIX_TIMEOUT 0 #endif @@ -272,17 +251,6 @@ void rgb_matrix_set_flags_noeeprom(led_flags_t flags); # define rgblight_decrease_speed_noeeprom rgb_matrix_decrease_speed_noeeprom #endif -typedef struct { - /* Perform any initialisation required for the other driver functions to work. */ - void (*init)(void); - /* Set the colour of a single LED in the buffer. */ - void (*set_color)(int index, uint8_t r, uint8_t g, uint8_t b); - /* Set the colour of all LEDS on the keyboard in the buffer. */ - void (*set_color_all)(uint8_t r, uint8_t g, uint8_t b); - /* Flush any buffered changes to the hardware. */ - void (*flush)(void); -} rgb_matrix_driver_t; - static inline bool rgb_matrix_check_finished_leds(uint8_t led_idx) { #if defined(RGB_MATRIX_SPLIT) if (is_keyboard_left()) { @@ -295,8 +263,6 @@ static inline bool rgb_matrix_check_finished_leds(uint8_t led_idx) { #endif } -extern const rgb_matrix_driver_t rgb_matrix_driver; - extern rgb_config_t rgb_matrix_config; extern uint32_t g_rgb_timer; diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c index 0f979cb233..e7bed0bf72 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix/rgb_matrix_drivers.c @@ -14,7 +14,11 @@ * along with this program. If not, see . */ -#include "rgb_matrix.h" +#include "rgb_matrix_drivers.h" + +#include +#include "keyboard.h" +#include "color.h" #include "util.h" /* Each driver needs to define the struct diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.h b/quantum/rgb_matrix/rgb_matrix_drivers.h new file mode 100644 index 0000000000..991344f087 --- /dev/null +++ b/quantum/rgb_matrix/rgb_matrix_drivers.h @@ -0,0 +1,41 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include + +#if defined(RGB_MATRIX_AW20216S) +# include "aw20216s.h" +#elif defined(RGB_MATRIX_IS31FL3218) +# include "is31fl3218.h" +#elif defined(RGB_MATRIX_IS31FL3731) +# include "is31fl3731.h" +#elif defined(RGB_MATRIX_IS31FL3733) +# include "is31fl3733.h" +#elif defined(RGB_MATRIX_IS31FL3736) +# include "is31fl3736.h" +#elif defined(RGB_MATRIX_IS31FL3737) +# include "is31fl3737.h" +#elif defined(RGB_MATRIX_IS31FL3741) +# include "is31fl3741.h" +#elif defined(IS31FLCOMMON) +# include "is31flcommon.h" +#elif defined(RGB_MATRIX_SNLED27351) +# include "snled27351.h" +#elif defined(RGB_MATRIX_WS2812) +# include "ws2812.h" +#endif + +typedef struct { + /* Perform any initialisation required for the other driver functions to work. */ + void (*init)(void); + /* Set the colour of a single LED in the buffer. */ + void (*set_color)(int index, uint8_t r, uint8_t g, uint8_t b); + /* Set the colour of all LEDS on the keyboard in the buffer. */ + void (*set_color_all)(uint8_t r, uint8_t g, uint8_t b); + /* Flush any buffered changes to the hardware. */ + void (*flush)(void); +} rgb_matrix_driver_t; + +extern const rgb_matrix_driver_t rgb_matrix_driver; -- cgit v1.2.3 From dc5befd13906f193f6ee8c2f9ace01100a167b20 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 16 Dec 2023 15:43:39 +0000 Subject: Remove redundant RGB/LED matrix eeconfig init (#22673) --- quantum/rgb_matrix/rgb_matrix.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'quantum/rgb_matrix') diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c index ebaf3077dc..fb7f20c210 100644 --- a/quantum/rgb_matrix/rgb_matrix.c +++ b/quantum/rgb_matrix/rgb_matrix.c @@ -460,12 +460,6 @@ void rgb_matrix_init(void) { } #endif // RGB_MATRIX_KEYREACTIVE_ENABLED - if (!eeconfig_is_enabled()) { - dprintf("rgb_matrix_init_drivers eeconfig is not enabled.\n"); - eeconfig_init(); - eeconfig_update_rgb_matrix_default(); - } - eeconfig_init_rgb_matrix(); if (!rgb_matrix_config.mode) { dprintf("rgb_matrix_init_drivers rgb_matrix_config.mode = 0. Write default values to EEPROM.\n"); -- cgit v1.2.3 From b9e81c06911a4e3345acf09cd499a9661eea67b8 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 19 Dec 2023 07:13:08 +1100 Subject: Update keyboard LED driver configs (#22638) --- quantum/rgb_matrix/rgb_matrix_drivers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'quantum/rgb_matrix') diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c index e7bed0bf72..ef12434aa2 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix/rgb_matrix_drivers.c @@ -107,7 +107,7 @@ const rgb_matrix_driver_t rgb_matrix_driver = { # endif // LED color buffer -rgb_led_t rgb_matrix_ws2812_array[RGB_MATRIX_LED_COUNT]; +rgb_led_t rgb_matrix_ws2812_array[WS2812_LED_COUNT]; bool ws2812_dirty = false; static void init(void) { @@ -116,7 +116,7 @@ static void init(void) { static void flush(void) { if (ws2812_dirty) { - ws2812_setleds(rgb_matrix_ws2812_array, RGB_MATRIX_LED_COUNT); + ws2812_setleds(rgb_matrix_ws2812_array, WS2812_LED_COUNT); ws2812_dirty = false; } } -- cgit v1.2.3 From 8812a095814fdad3ab245fa2c00e29cb50ee2e92 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 20 Dec 2023 13:31:50 +1100 Subject: Rename `RGB_DISABLE_WHEN_USB_SUSPENDED` -> `RGB_MATRIX_SLEEP` (#22682) --- quantum/rgb_matrix/rgb_matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'quantum/rgb_matrix') diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c index fb7f20c210..4865664ac0 100644 --- a/quantum/rgb_matrix/rgb_matrix.c +++ b/quantum/rgb_matrix/rgb_matrix.c @@ -469,7 +469,7 @@ void rgb_matrix_init(void) { } void rgb_matrix_set_suspend_state(bool state) { -#ifdef RGB_DISABLE_WHEN_USB_SUSPENDED +#ifdef RGB_MATRIX_SLEEP if (state && !suspend_state) { // only run if turning off, and only once rgb_task_render(0); // turn off all LEDs when suspending rgb_task_flush(0); // and actually flash led state to LEDs -- cgit v1.2.3 From e1c0bd8a7c8d86ca573b430d5a914cf649c8d9b2 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 1 Jan 2024 12:40:35 +1100 Subject: LED drivers: extract IS31FL3742A from IS31COMMON (#22620) --- quantum/rgb_matrix/rgb_matrix_drivers.c | 8 ++++++++ quantum/rgb_matrix/rgb_matrix_drivers.h | 2 ++ 2 files changed, 10 insertions(+) (limited to 'quantum/rgb_matrix') diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c index ef12434aa2..79f82a0c87 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix/rgb_matrix_drivers.c @@ -76,6 +76,14 @@ const rgb_matrix_driver_t rgb_matrix_driver = { .set_color_all = is31fl3741_set_color_all, }; +#elif defined(RGB_MATRIX_IS31FL3742A) +const rgb_matrix_driver_t rgb_matrix_driver = { + .init = is31fl3742a_init_drivers, + .flush = is31fl3742a_flush, + .set_color = is31fl3742a_set_color, + .set_color_all = is31fl3742a_set_color_all, +}; + #elif defined(IS31FLCOMMON) const rgb_matrix_driver_t rgb_matrix_driver = { .init = IS31FL_RGB_init_drivers, diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.h b/quantum/rgb_matrix/rgb_matrix_drivers.h index 991344f087..298167e6ed 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.h +++ b/quantum/rgb_matrix/rgb_matrix_drivers.h @@ -19,6 +19,8 @@ # include "is31fl3737.h" #elif defined(RGB_MATRIX_IS31FL3741) # include "is31fl3741.h" +#elif defined(RGB_MATRIX_IS31FL3742A) +# include "is31fl3742a.h" #elif defined(IS31FLCOMMON) # include "is31flcommon.h" #elif defined(RGB_MATRIX_SNLED27351) -- cgit v1.2.3 From ae2d5e2e5a170fa49e25b324c63e8650e6c872f9 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 1 Jan 2024 17:04:51 +1100 Subject: LED drivers: extract IS31FL3743A from IS31COMMON (#22635) --- quantum/rgb_matrix/rgb_matrix_drivers.c | 8 ++++++++ quantum/rgb_matrix/rgb_matrix_drivers.h | 2 ++ 2 files changed, 10 insertions(+) (limited to 'quantum/rgb_matrix') diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c index 79f82a0c87..5631c25964 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix/rgb_matrix_drivers.c @@ -84,6 +84,14 @@ const rgb_matrix_driver_t rgb_matrix_driver = { .set_color_all = is31fl3742a_set_color_all, }; +#elif defined(RGB_MATRIX_IS31FL3743A) +const rgb_matrix_driver_t rgb_matrix_driver = { + .init = is31fl3743a_init_drivers, + .flush = is31fl3743a_flush, + .set_color = is31fl3743a_set_color, + .set_color_all = is31fl3743a_set_color_all, +}; + #elif defined(IS31FLCOMMON) const rgb_matrix_driver_t rgb_matrix_driver = { .init = IS31FL_RGB_init_drivers, diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.h b/quantum/rgb_matrix/rgb_matrix_drivers.h index 298167e6ed..90fde67bdc 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.h +++ b/quantum/rgb_matrix/rgb_matrix_drivers.h @@ -21,6 +21,8 @@ # include "is31fl3741.h" #elif defined(RGB_MATRIX_IS31FL3742A) # include "is31fl3742a.h" +#elif defined(RGB_MATRIX_IS31FL3743A) +# include "is31fl3743a.h" #elif defined(IS31FLCOMMON) # include "is31flcommon.h" #elif defined(RGB_MATRIX_SNLED27351) -- cgit v1.2.3 From a88dd675bf3e1dedac2ceb7df779e0fb6931948a Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 1 Jan 2024 19:31:44 +1100 Subject: LED drivers: extract IS31FL3745 from IS31COMMON (#22636) --- quantum/rgb_matrix/rgb_matrix_drivers.c | 8 ++++++++ quantum/rgb_matrix/rgb_matrix_drivers.h | 2 ++ 2 files changed, 10 insertions(+) (limited to 'quantum/rgb_matrix') diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c index 5631c25964..0a41991efb 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix/rgb_matrix_drivers.c @@ -92,6 +92,14 @@ const rgb_matrix_driver_t rgb_matrix_driver = { .set_color_all = is31fl3743a_set_color_all, }; +#elif defined(RGB_MATRIX_IS31FL3745) +const rgb_matrix_driver_t rgb_matrix_driver = { + .init = is31fl3745_init_drivers, + .flush = is31fl3745_flush, + .set_color = is31fl3745_set_color, + .set_color_all = is31fl3745_set_color_all, +}; + #elif defined(IS31FLCOMMON) const rgb_matrix_driver_t rgb_matrix_driver = { .init = IS31FL_RGB_init_drivers, diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.h b/quantum/rgb_matrix/rgb_matrix_drivers.h index 90fde67bdc..786f2fa37a 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.h +++ b/quantum/rgb_matrix/rgb_matrix_drivers.h @@ -23,6 +23,8 @@ # include "is31fl3742a.h" #elif defined(RGB_MATRIX_IS31FL3743A) # include "is31fl3743a.h" +#elif defined(RGB_MATRIX_IS31FL3745) +# include "is31fl3745.h" #elif defined(IS31FLCOMMON) # include "is31flcommon.h" #elif defined(RGB_MATRIX_SNLED27351) -- cgit v1.2.3 From 0a6913b68274c03302b09466a79b99efffd35e59 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 1 Jan 2024 21:44:18 +1100 Subject: LED drivers: extract IS31FL3746A from IS31COMMON (#22637) --- quantum/rgb_matrix/rgb_matrix_drivers.c | 8 ++++++++ quantum/rgb_matrix/rgb_matrix_drivers.h | 2 ++ 2 files changed, 10 insertions(+) (limited to 'quantum/rgb_matrix') diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c index 0a41991efb..e3dd9beff7 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix/rgb_matrix_drivers.c @@ -100,6 +100,14 @@ const rgb_matrix_driver_t rgb_matrix_driver = { .set_color_all = is31fl3745_set_color_all, }; +#elif defined(RGB_MATRIX_IS31FL3746A) +const rgb_matrix_driver_t rgb_matrix_driver = { + .init = is31fl3746a_init_drivers, + .flush = is31fl3746a_flush, + .set_color = is31fl3746a_set_color, + .set_color_all = is31fl3746a_set_color_all, +}; + #elif defined(IS31FLCOMMON) const rgb_matrix_driver_t rgb_matrix_driver = { .init = IS31FL_RGB_init_drivers, diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.h b/quantum/rgb_matrix/rgb_matrix_drivers.h index 786f2fa37a..07d376dfd7 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.h +++ b/quantum/rgb_matrix/rgb_matrix_drivers.h @@ -25,6 +25,8 @@ # include "is31fl3743a.h" #elif defined(RGB_MATRIX_IS31FL3745) # include "is31fl3745.h" +#elif defined(RGB_MATRIX_IS31FL3746A) +# include "is31fl3746a.h" #elif defined(IS31FLCOMMON) # include "is31flcommon.h" #elif defined(RGB_MATRIX_SNLED27351) -- cgit v1.2.3 From f583d2fef01372f55057dcf44569252e3582d0f5 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 2 Jan 2024 16:26:01 +1100 Subject: Remove IS31FLCOMMON code (#22800) --- quantum/rgb_matrix/rgb_matrix_drivers.c | 8 -------- quantum/rgb_matrix/rgb_matrix_drivers.h | 2 -- 2 files changed, 10 deletions(-) (limited to 'quantum/rgb_matrix') diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c index e3dd9beff7..b5e539657d 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix/rgb_matrix_drivers.c @@ -108,14 +108,6 @@ const rgb_matrix_driver_t rgb_matrix_driver = { .set_color_all = is31fl3746a_set_color_all, }; -#elif defined(IS31FLCOMMON) -const rgb_matrix_driver_t rgb_matrix_driver = { - .init = IS31FL_RGB_init_drivers, - .flush = IS31FL_common_flush, - .set_color = IS31FL_RGB_set_color, - .set_color_all = IS31FL_RGB_set_color_all, -}; - #elif defined(RGB_MATRIX_SNLED27351) const rgb_matrix_driver_t rgb_matrix_driver = { .init = snled27351_init_drivers, diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.h b/quantum/rgb_matrix/rgb_matrix_drivers.h index 07d376dfd7..8f919b1b3c 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.h +++ b/quantum/rgb_matrix/rgb_matrix_drivers.h @@ -27,8 +27,6 @@ # include "is31fl3745.h" #elif defined(RGB_MATRIX_IS31FL3746A) # include "is31fl3746a.h" -#elif defined(IS31FLCOMMON) -# include "is31flcommon.h" #elif defined(RGB_MATRIX_SNLED27351) # include "snled27351.h" #elif defined(RGB_MATRIX_WS2812) -- cgit v1.2.3 From f39386a112c440c02c7003d59b1624590140dd07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=95=E3=82=A3=E3=83=AB=E3=82=BF=E3=83=BC=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=83=91=E3=83=BC?= <76888457+filterpaper@users.noreply.github.com> Date: Tue, 9 Jan 2024 19:12:42 +0800 Subject: Solid reactive: improve fading effect (#22656) --- quantum/rgb_matrix/animations/solid_reactive_anim.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'quantum/rgb_matrix') diff --git a/quantum/rgb_matrix/animations/solid_reactive_anim.h b/quantum/rgb_matrix/animations/solid_reactive_anim.h index edf6041350..e18ffb5f2b 100644 --- a/quantum/rgb_matrix/animations/solid_reactive_anim.h +++ b/quantum/rgb_matrix/animations/solid_reactive_anim.h @@ -7,7 +7,7 @@ static HSV SOLID_REACTIVE_math(HSV hsv, uint16_t offset) { # ifdef RGB_MATRIX_SOLID_REACTIVE_GRADIENT_MODE hsv.h = scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 8) >> 4); # endif - hsv.h += qsub8(130, offset); + hsv.h += scale8(255 - offset, 64); return hsv; } -- cgit v1.2.3 From 734c7afa7d142e9d052d067615540d067ed4fdcf Mon Sep 17 00:00:00 2001 From: Fabien Fellay <33905146+FabienFellay@users.noreply.github.com> Date: Tue, 30 Jan 2024 04:56:32 +0100 Subject: Add missing rgb matrix default parameters (#22281) --- quantum/rgb_matrix/rgb_matrix.c | 2 +- quantum/rgb_matrix/rgb_matrix.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'quantum/rgb_matrix') diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c index 4865664ac0..655aca1867 100644 --- a/quantum/rgb_matrix/rgb_matrix.c +++ b/quantum/rgb_matrix/rgb_matrix.c @@ -100,7 +100,7 @@ void eeconfig_update_rgb_matrix_default(void) { rgb_matrix_config.mode = RGB_MATRIX_DEFAULT_MODE; rgb_matrix_config.hsv = (HSV){RGB_MATRIX_DEFAULT_HUE, RGB_MATRIX_DEFAULT_SAT, RGB_MATRIX_DEFAULT_VAL}; rgb_matrix_config.speed = RGB_MATRIX_DEFAULT_SPD; - rgb_matrix_config.flags = LED_FLAG_ALL; + rgb_matrix_config.flags = RGB_MATRIX_DEFAULT_FLAGS; eeconfig_flush_rgb_matrix(true); } diff --git a/quantum/rgb_matrix/rgb_matrix.h b/quantum/rgb_matrix/rgb_matrix.h index b1bf839bf6..f8a6845e02 100644 --- a/quantum/rgb_matrix/rgb_matrix.h +++ b/quantum/rgb_matrix/rgb_matrix.h @@ -78,6 +78,10 @@ # define RGB_MATRIX_DEFAULT_SPD UINT8_MAX / 2 #endif +#ifndef RGB_MATRIX_DEFAULT_FLAGS +# define RGB_MATRIX_DEFAULT_FLAGS LED_FLAG_ALL +#endif + #ifndef RGB_MATRIX_LED_FLUSH_LIMIT # define RGB_MATRIX_LED_FLUSH_LIMIT 16 #endif -- cgit v1.2.3 From f6709e65ebfd385a9963348d41c19abe9b91e8ad Mon Sep 17 00:00:00 2001 From: HorrorTroll Date: Fri, 16 Feb 2024 21:41:35 +0700 Subject: Add RGB matrix & LED Matrix support for IS31FL3729 (#21944) Co-authored-by: Xelus22 Co-authored-by: dexter93 --- quantum/rgb_matrix/rgb_matrix_drivers.c | 8 ++++++++ quantum/rgb_matrix/rgb_matrix_drivers.h | 2 ++ 2 files changed, 10 insertions(+) (limited to 'quantum/rgb_matrix') diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c index b5e539657d..95d1e884f0 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix/rgb_matrix_drivers.c @@ -36,6 +36,14 @@ const rgb_matrix_driver_t rgb_matrix_driver = { .set_color_all = is31fl3218_set_color_all, }; +#elif defined(RGB_MATRIX_IS31FL3729) +const rgb_matrix_driver_t rgb_matrix_driver = { + .init = is31fl3729_init_drivers, + .flush = is31fl3729_flush, + .set_color = is31fl3729_set_color, + .set_color_all = is31fl3729_set_color_all, +}; + #elif defined(RGB_MATRIX_IS31FL3731) const rgb_matrix_driver_t rgb_matrix_driver = { .init = is31fl3731_init_drivers, diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.h b/quantum/rgb_matrix/rgb_matrix_drivers.h index 8f919b1b3c..a24cb03a18 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.h +++ b/quantum/rgb_matrix/rgb_matrix_drivers.h @@ -9,6 +9,8 @@ # include "aw20216s.h" #elif defined(RGB_MATRIX_IS31FL3218) # include "is31fl3218.h" +#elif defined(RGB_MATRIX_IS31FL3729) +# include "is31fl3729.h" #elif defined(RGB_MATRIX_IS31FL3731) # include "is31fl3731.h" #elif defined(RGB_MATRIX_IS31FL3733) -- cgit v1.2.3