Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_ws2812b.h
1 #ifndef _BC_WS2812B_H
2 #define _BC_WS2812B_H
3 
4 #include <bc_led_strip.h>
5 
9 
11 
12 typedef enum
13 {
14  BC_WS2812B_SEND_DONE = 0,
15 
16 } bc_ws2812b_event_t;
17 
18 bool bc_ws2812b_init(const bc_led_strip_buffer_t *led_strip);
19 
20 void bc_ws2812b_set_event_handler(void (*event_handler)(bc_ws2812b_event_t, void *), void *event_param);
21 
22 void bc_ws2812b_set_pixel_from_rgb(int position, uint8_t red, uint8_t green, uint8_t blue, uint8_t white);
23 
24 void bc_ws2812b_set_pixel_from_uint32(int position, uint32_t color);
25 
26 void bc_ws2812b_set_pixel_from_rgb_swap_rg(int position, uint8_t red, uint8_t green, uint8_t blue, uint8_t white);
27 
28 void bc_ws2812b_set_pixel_from_uint32_swap_rg(int position, uint32_t color);
29 
30 bool bc_ws2812b_write(void);
31 
32 bool bc_ws2812b_is_ready(void);
33 
35 
36 #endif // _BC_WS2812B_H