rgb_functions.c (1240B)
1 /* Copyright 2021 Drashna Jael're 2 * 3 * This program is free software: you can redistribute it and/or modify 4 * it under the terms of the GNU General Public License as published by 5 * the Free Software Foundation, either version 2 of the License, or 6 * (at your option) any later version. 7 * 8 * This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details. 12 * 13 * You should have received a copy of the GNU General Public License 14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 */ 16 17 #ifdef RGBLIGHT_ENABLE 18 19 #include "rgblight.h" 20 21 #undef WS2812_DI_PIN 22 #define WS2812_DI_PIN RGBLIGHT_DI_PIN 23 24 #define ws2812_init ws2812_rgb_init 25 #define ws2812_set_color ws2812_rgb_set_color 26 #define ws2812_set_color_all ws2812_rgb_set_color_all 27 #define ws2812_flush ws2812_rgb_flush 28 #define ws2812_leds ws2812_rgb_leds 29 30 #include "ws2812_bitbang.c" 31 32 const rgblight_driver_t rgblight_driver = { 33 .init = ws2812_init, 34 .set_color = ws2812_set_color, 35 .set_color_all = ws2812_set_color_all, 36 .flush = ws2812_flush, 37 }; 38 #endif