You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.3 KiB

  1. /*
  2. * light weight WS2812 lib include
  3. *
  4. * Version 2.3 - Nev 29th 2015
  5. * Author: Tim (cpldcpu@gmail.com)
  6. *
  7. * Please do not change this file! All configuration is handled in "ws2812_config.h"
  8. *
  9. * This program is free software: you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation, either version 2 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  21. */
  22. #ifndef RGBLIGHT_TYPES
  23. #define RGBLIGHT_TYPES
  24. #ifdef __AVR__
  25. #include <avr/io.h>
  26. #endif
  27. #ifdef RGBW
  28. #define LED_TYPE struct cRGBW
  29. #else
  30. #define LED_TYPE struct cRGB
  31. #endif
  32. /*
  33. * Structure of the LED array
  34. *
  35. * cRGB: RGB for WS2812S/B/C/D, SK6812, SK6812Mini, SK6812WWA, APA104, APA106
  36. * cRGBW: RGBW for SK6812RGBW
  37. */
  38. struct cRGB { uint8_t g; uint8_t r; uint8_t b; };
  39. struct cRGBW { uint8_t g; uint8_t r; uint8_t b; uint8_t w;};
  40. #endif