WS2812 RMT Driver
API reference
Loading...
Searching...
No Matches
Classes | Functions
led_strip_encoder.h File Reference
#include "driver/rmt_encoder.h"
#include <stdint.h>
Include dependency graph for led_strip_encoder.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  led_strip_encoder_config_t
 Type of led strip encoder configuration. More...
 

Functions

esp_err_t rmt_new_led_strip_encoder (const led_strip_encoder_config_t *config, rmt_encoder_handle_t *ret_encoder)
 Create RMT encoder for encoding LED strip pixels into RMT symbols.
 

Function Documentation

◆ rmt_new_led_strip_encoder()

esp_err_t rmt_new_led_strip_encoder ( const led_strip_encoder_config_t *  config,
rmt_encoder_handle_t *  ret_encoder 
)

Create RMT encoder for encoding LED strip pixels into RMT symbols.

The encoder takes bytes in wire order (G, R, B for a WS2812B; G, R, B, W for an RGBW part), sends them high bit first and appends the reset code.

Parameters
[in]configEncoder configuration
[out]ret_encoderReturned encoder handle
Returns
  • ESP_ERR_INVALID_ARG for any invalid arguments
  • ESP_ERR_NO_MEM out of memory when creating led strip encoder
  • ESP_OK if creating encoder successfully