rgb_functions.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. #ifdef RGBLIGHT_ENABLE
  17. #include "rgblight.h"
  18. #undef WS2812_DI_PIN
  19. #define WS2812_DI_PIN RGBLIGHT_DI_PIN
  20. #define ws2812_init ws2812_rgb_init
  21. #define ws2812_set_color ws2812_rgb_set_color
  22. #define ws2812_set_color_all ws2812_rgb_set_color_all
  23. #define ws2812_flush ws2812_rgb_flush
  24. #define ws2812_leds ws2812_rgb_leds
  25. #include "ws2812_bitbang.c"
  26. const rgblight_driver_t rgblight_driver = {
  27. .init = ws2812_init,
  28. .set_color = ws2812_set_color,
  29. .set_color_all = ws2812_set_color_all,
  30. .flush = ws2812_flush,
  31. };
  32. #endif