diff options
author | XScorpion2 <rcalt2vt@gmail.com> | 2019-04-14 20:50:35 -0400 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-04-16 18:11:33 -0700 |
commit | e3fce19c55271f4a383ac81a0ba33875262897f4 (patch) | |
tree | 3daa55aa215609d5e411574b3959e5275bb10b81 /quantum/rgb_matrix_drivers.c | |
parent | 590a07bf946c47dc80604b54e9f1a45b517b5e05 (diff) |
Features/ws2812 matrix driver (#5418)
* WS2812 driver implementation for RGB Matrix
* Added driver configuration docs
Diffstat (limited to 'quantum/rgb_matrix_drivers.c')
-rw-r--r-- | quantum/rgb_matrix_drivers.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c index 3b7d58483a..3814dd61fc 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 |