44 #define WS2811_TARGET_FREQ 800000 // Can go as low as 400000 47 #define SK6812_STRIP_RGBW 0x18100800 48 #define SK6812_STRIP_RBGW 0x18100008 49 #define SK6812_STRIP_GRBW 0x18081000 50 #define SK6812_STRIP_GBRW 0x18080010 51 #define SK6812_STRIP_BRGW 0x18001008 52 #define SK6812_STRIP_BGRW 0x18000810 53 #define SK6812_SHIFT_WMASK 0xf0000000 56 #define WS2811_STRIP_RGB 0x00100800 57 #define WS2811_STRIP_RBG 0x00100008 58 #define WS2811_STRIP_GRB 0x00081000 59 #define WS2811_STRIP_GBR 0x00080010 60 #define WS2811_STRIP_BRG 0x00001008 61 #define WS2811_STRIP_BGR 0x00000810 64 #define WS2812_STRIP WS2811_STRIP_GRB 65 #define SK6812_STRIP WS2811_STRIP_GRB 66 #define SK6812W_STRIP SK6812_STRIP_GRBW 88 uint64_t render_wait_time;
96 #define WS2811_RETURN_STATES(X) \ 97 X(0, WS2811_SUCCESS, "Success"), \ 98 X(-1, WS2811_ERROR_GENERIC, "Generic failure"), \ 99 X(-2, WS2811_ERROR_OUT_OF_MEMORY, "Out of memory"), \ 100 X(-3, WS2811_ERROR_HW_NOT_SUPPORTED, "Hardware revision is not supported"), \ 101 X(-4, WS2811_ERROR_MEM_LOCK, "Memory lock failed"), \ 102 X(-5, WS2811_ERROR_MMAP, "mmap() failed"), \ 103 X(-6, WS2811_ERROR_MAP_REGISTERS, "Unable to map registers into userspace"), \ 104 X(-7, WS2811_ERROR_GPIO_INIT, "Unable to initialize GPIO"), \ 105 X(-8, WS2811_ERROR_PWM_SETUP, "Unable to initialize PWM"), \ 106 X(-9, WS2811_ERROR_MAILBOX_DEVICE, "Failed to create mailbox device"), \ 107 X(-10, WS2811_ERROR_DMA, "DMA error"), \ 108 X(-11, WS2811_ERROR_ILLEGAL_GPIO, "Selected GPIO not possible"), \ 109 X(-12, WS2811_ERROR_PCM_SETUP, "Unable to initialize PCM"), \ 110 X(-13, WS2811_ERROR_SPI_SETUP, "Unable to initialize SPI"), \ 111 X(-14, WS2811_ERROR_SPI_TRANSFER, "SPI transfer error") \ 113 #define WS2811_RETURN_STATES_ENUM(state, name, str) name = state 114 #define WS2811_RETURN_STATES_STRING(state, name, str) str
const char * ws2811_get_return_t_str(const ws2811_return_t state)
#define WS2811_RETURN_STATES(X)
ws2811_return_t ws2811_wait(ws2811_t *ws2811)
ws2811_return_t ws2811_render(ws2811_t *ws2811)
struct ws2811_channel_t ws2811_channel_t
ws2811_return_t ws2811_init(ws2811_t *ws2811)
#define WS2811_RETURN_STATES_ENUM(state, name, str)
void ws2811_fini(ws2811_t *ws2811)