ws2812.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef _WS2812_H
  2. #define _WS2812_H
  3. #define WSGPIO 0
  4. #include "c_types.h"
  5. #include "user_interface.h"
  6. #include "ets_sys.h"
  7. #include "gpio.h"
  8. /*------------------------------------------------------------------------------*/
  9. // Configuration Parameters
  10. /*------------------------------------------------------------------------------*/
  11. #define WS2811_COMPATIBLE 0 // set to make driver backwards compatable.
  12. /*------------------------------------------------------------------------------*/
  13. //You will have to os_intr_lock(); os_intr_unlock();
  14. /*
  15. NOTE: The first byte stored is the last byte sent. 50us is required for sent data to latch to all LEDS
  16. Data is stored in the following format:
  17. [ byte1: green, byte2: red, byte3: blue]
  18. NOTE: Every function except ws2812_outBuffer is stored in Flash.
  19. */
  20. /*------------------------------------------------------------------------------*/
  21. // Function Prototypes
  22. /*------------------------------------------------------------------------------*/
  23. void ws2812_outBuffer( uint8_t * buffer, uint16_t length );
  24. // void ws2812_green(void);
  25. // void ws2812_red(void);
  26. // void ws2812_blue(void);
  27. // void ws2812_clear(void);
  28. /*------------------------------------------------------------------------------*/
  29. #endif