12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- #ifndef _WS2812_H
- #define _WS2812_H
- #define WSGPIO 0
- #include "c_types.h"
- #include "user_interface.h"
- #include "ets_sys.h"
- #include "gpio.h"
- #include "ets_sys.h"
- #include "osapi.h"
- #include "math.h"
- #include "log/esp_log.h"
- #define WS2811_COMPATIBLE 0
- #define WS2812_REFRESH_INTERVAL 60
- #define WS2812_RED_INDEX 1
- #define WS2812_GREEN_INDEX 0
- #define WS2812_BLUE_INDEX 2
- typedef enum {
- WS2812_OFF = 0,
- WS2812_RED,
- WS2812_BLUE,
- WS2812_GREEN,
- WS2812_MAGENTA,
- WS2812_ORANGE
- } WS2812_COLOR_et;
- typedef enum {
- WS2812_SOLID = 0,
- WS2812_PULSE
- } WS2812_PATTERN_et;
- typedef enum {
- WS2812_UP = 0,
- WS2812_DOWN
- } WS2812_DIRECTION_et;
- typedef struct {
- WS2812_COLOR_et color;
- WS2812_PATTERN_et pattern;
- uint8_t color_mask[3];
- uint32_t led_state;
- WS2812_DIRECTION_et direction;
- } WS2812_CONFIG_t;
- void WS2812_OutBuffer(int8_t * buffer, uint16_t length);
- void WS2812_SetColor(WS2812_COLOR_et color, WS2812_PATTERN_et pattern);
- #endif
|