FastLED 3.9.15
Loading...
Searching...
No Matches
led_strip_interface.h File Reference
#include <stdint.h>
#include "esp_err.h"
+ Include dependency graph for led_strip_interface.h:

Go to the source code of this file.

Classes

struct  led_strip_t
 LED strip interface definition. More...
 

Typedefs

typedef struct led_strip_t led_strip_t
 

Class Documentation

◆ led_strip_t

struct led_strip_t
Class Members
esp_err_t(*)(led_strip_t *strip) clear Clear LED strip (turn off all LEDs)
Parameters
stripLED strip
timeout_mstimeout value for clearing task
Returns
  • ESP_OK: Clear LEDs successfully
  • ESP_FAIL: Clear LEDs failed because some other error occurred
esp_err_t(*)(led_strip_t *strip) del Free LED strip resources.
Parameters
stripLED strip
Returns
  • ESP_OK: Free resources successfully
  • ESP_FAIL: Free resources failed because error occurred
esp_err_t(*)(led_strip_t *strip) refresh Refresh memory colors to LEDs.
Parameters
stripLED strip
timeout_mstimeout value for refreshing task
Returns
  • ESP_OK: Refresh successfully
  • ESP_FAIL: Refresh failed because some other error occurred
Note
: After updating the LED colors in the memory, a following invocation of this API is needed to flush colors to strip.
esp_err_t(*)(led_strip_t *strip) refresh_async
esp_err_t(*)(led_strip_t *strip) refresh_wait_done
esp_err_t(*)(led_strip_t *strip, uint32_t index, uint32_t red, uint32_t green, uint32_t blue) set_pixel Set RGB for a specific pixel.
Parameters
stripLED strip
indexindex of pixel to set
redred part of color
greengreen part of color
blueblue part of color
Returns
  • ESP_OK: Set RGB for a specific pixel successfully
  • ESP_ERR_INVALID_ARG: Set RGB for a specific pixel failed because of invalid parameters
  • ESP_FAIL: Set RGB for a specific pixel failed because other error occurred
esp_err_t(*)(led_strip_t *strip, uint32_t index, uint32_t red, uint32_t green, uint32_t blue, uint32_t white) set_pixel_rgbw Set RGBW for a specific pixel.

Similar to set_pixel but also set the white component

Parameters
stripLED strip
indexindex of pixel to set
redred part of color
greengreen part of color
blueblue part of color
whiteseparate white component
Returns
  • ESP_OK: Set RGBW color for a specific pixel successfully
  • ESP_ERR_INVALID_ARG: Set RGBW color for a specific pixel failed because of an invalid argument
  • ESP_FAIL: Set RGBW color for a specific pixel failed because other error occurred