aboutsummaryrefslogtreecommitdiffstats
path: root/quantum/rgb_matrix_drivers.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/rgb_matrix_drivers.c')
-rw-r--r--quantum/rgb_matrix_drivers.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c
index 3b7d58483..3814dd61f 100644
--- a/quantum/rgb_matrix_drivers.c
+++ b/quantum/rgb_matrix_drivers.c
@@ -97,4 +97,25 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
};
#endif
+#elif defined(WS2812)
+
+extern LED_TYPE led[RGBLED_NUM];
+
+ static void flush( void )
+ {
+ // Assumes use of RGB_DI_PIN
+ ws2812_setleds(led, RGBLED_NUM);
+ }
+
+ static void init( void )
+ {
+
+ }
+
+ const rgb_matrix_driver_t rgb_matrix_driver = {
+ .init = init,
+ .flush = flush,
+ .set_color = ws2812_setled,
+ .set_color_all = ws2812_setled_all,
+ };
#endif