summaryrefslogtreecommitdiff
path: root/quantum/rgb_matrix/rgb_matrix_drivers.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/rgb_matrix/rgb_matrix_drivers.c')
-rw-r--r--quantum/rgb_matrix/rgb_matrix_drivers.c44
1 files changed, 36 insertions, 8 deletions
diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c
index 0f979cb233..b5e539657d 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 <http://www.gnu.org/licenses/>.
*/
-#include "rgb_matrix.h"
+#include "rgb_matrix_drivers.h"
+
+#include <stdbool.h>
+#include "keyboard.h"
+#include "color.h"
#include "util.h"
/* Each driver needs to define the struct
@@ -72,12 +76,36 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
.set_color_all = is31fl3741_set_color_all,
};
-#elif defined(IS31FLCOMMON)
+#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(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(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(RGB_MATRIX_IS31FL3746A)
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,
+ .init = is31fl3746a_init_drivers,
+ .flush = is31fl3746a_flush,
+ .set_color = is31fl3746a_set_color,
+ .set_color_all = is31fl3746a_set_color_all,
};
#elif defined(RGB_MATRIX_SNLED27351)
@@ -103,7 +131,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) {
@@ -112,7 +140,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;
}
}