WS2812_ATY.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /**
  2. * @file WS2812_ATY.h
  3. *
  4. * @param Project DEVICE_GENERAL_ATY_LIB
  5. *
  6. * @author ATY
  7. *
  8. * @copyright
  9. * - Copyright 2017 - 2026 MZ-ATY
  10. * - This code follows:
  11. * - MZ-ATY Various Contents Joint Statement -
  12. * <a href="https://mengze.top/MZ-ATY_VCJS">
  13. * https://mengze.top/MZ-ATY_VCJS</a>
  14. * - CC 4.0 BY-NC-SA -
  15. * <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">
  16. * https://creativecommons.org/licenses/by-nc-sa/4.0/</a>
  17. * - Your use will be deemed to have accepted the terms of this statement.
  18. *
  19. * @brief functions of WS2812 for C platform (Dev-style)
  20. *
  21. * @version
  22. * - 1_01_251112 > ATY
  23. * -# Refactor to Dev-style; remove legacy global interfaces
  24. ********************************************************************************
  25. */
  26. #ifndef __WS2812_ATY_H
  27. #define __WS2812_ATY_H
  28. #include "INCLUDE_ATY.h"
  29. struct WS2812_ATY_Dev
  30. {
  31. void (*sendBit)(uint8_t bit);
  32. void (*reset_us)(uint16_t us);
  33. uint8_t lock;
  34. };
  35. uint8_t WS2812_InitDev(struct WS2812_ATY_Dev* dev);
  36. void WS2812_SendColorDev(struct WS2812_ATY_Dev* dev, uint8_t R, uint8_t G, uint8_t B);
  37. void WS2812_SendBufferDev(struct WS2812_ATY_Dev* dev, const uint8_t* rgb, uint16_t count);
  38. #endif /* __WS2812_ATY_H */
  39. /******************************** End Of File *********************************/