Swadge 2024 2.0.0
APIs to develop games for the Magfest Swadge
Loading...
Searching...
No Matches
led_strip_encoder.c File Reference

Data Structures

struct  rmt_led_strip_encoder_t
 An encoder to use the RMT peripheral to drive RGB LEDs. 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.
 

Data Structure Documentation

◆ rmt_led_strip_encoder_t

struct rmt_led_strip_encoder_t
Data Fields
rmt_encoder_t base The base encoder.
rmt_encoder_t * bytes_encoder A pointer to the bytes encoder.
rmt_encoder_t * copy_encoder A pointer to the copy encoder.
int state The current encoder state bitmask. Bit values are in rmt_encode_state_t.
rmt_symbol_word_t reset_code The reset code.

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.

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