logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

rgb_functions.c (1204B)


  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. #include "ws2812_bitbang.c"
  25. const rgblight_driver_t rgblight_driver = {
  26. .init = ws2812_init,
  27. .set_color = ws2812_set_color,
  28. .set_color_all = ws2812_set_color_all,
  29. .flush = ws2812_flush,
  30. };
  31. #endif