|
ESP-IDF Firmware
Firmware architecture and call graph
|
#include <stdlib.h>#include <string.h>#include <sys/cdefs.h>#include "esp_log.h"#include "esp_check.h"#include "driver/rmt.h"#include "led_strip.h"#include "led_strip_interface.h"Go to the source code of this file.
Data Structures | |
| struct | led_strip_rmt_obj |
Macros | |
| #define | WS2812_T0H_NS (300) |
| #define | WS2812_T0L_NS (900) |
| #define | WS2812_T1H_NS (900) |
| #define | WS2812_T1L_NS (300) |
| #define | SK6812_T0H_NS (300) |
| #define | SK6812_T0L_NS (900) |
| #define | SK6812_T1H_NS (600) |
| #define | SK6812_T1L_NS (600) |
| #define | LED_STRIP_RESET_MS (10) |
| #define | LED_STRIP_RMT_DEFAULT_MEM_BLOCK_SYMBOLS 48 |
Functions | |
| static void | ws2812_rmt_adapter (const void *src, rmt_item32_t *dest, size_t src_size, size_t wanted_num, size_t *translated_size, size_t *item_num) |
| static esp_err_t | led_strip_rmt_set_pixel (led_strip_t *strip, uint32_t index, uint32_t red, uint32_t green, uint32_t blue) |
| static esp_err_t | led_strip_rmt_refresh (led_strip_t *strip) |
| static esp_err_t | led_strip_rmt_clear (led_strip_t *strip) |
| static esp_err_t | led_strip_rmt_del (led_strip_t *strip) |
| esp_err_t | led_strip_new_rmt_device (const led_strip_config_t *led_config, const led_strip_rmt_config_t *dev_config, led_strip_handle_t *ret_strip) |
| Create LED strip based on RMT TX channel. | |
Variables | |
| static const char * | TAG = "led_strip_rmt" |
| static uint32_t | led_t0h_ticks = 0 |
| static uint32_t | led_t1h_ticks = 0 |
| static uint32_t | led_t0l_ticks = 0 |
| static uint32_t | led_t1l_ticks = 0 |
| #define LED_STRIP_RESET_MS (10) |
Definition at line 27 of file led_strip_rmt_dev_idf4.c.
Referenced by led_strip_rmt_refresh().
| #define LED_STRIP_RMT_DEFAULT_MEM_BLOCK_SYMBOLS 48 |
Definition at line 33 of file led_strip_rmt_dev_idf4.c.
| #define SK6812_T0H_NS (300) |
Definition at line 22 of file led_strip_rmt_dev_idf4.c.
Referenced by led_strip_new_rmt_device().
| #define SK6812_T0L_NS (900) |
Definition at line 23 of file led_strip_rmt_dev_idf4.c.
Referenced by led_strip_new_rmt_device().
| #define SK6812_T1H_NS (600) |
Definition at line 24 of file led_strip_rmt_dev_idf4.c.
Referenced by led_strip_new_rmt_device().
| #define SK6812_T1L_NS (600) |
Definition at line 25 of file led_strip_rmt_dev_idf4.c.
Referenced by led_strip_new_rmt_device().
| #define WS2812_T0H_NS (300) |
Definition at line 17 of file led_strip_rmt_dev_idf4.c.
Referenced by led_strip_new_rmt_device().
| #define WS2812_T0L_NS (900) |
Definition at line 18 of file led_strip_rmt_dev_idf4.c.
Referenced by led_strip_new_rmt_device().
| #define WS2812_T1H_NS (900) |
Definition at line 19 of file led_strip_rmt_dev_idf4.c.
Referenced by led_strip_new_rmt_device().
| #define WS2812_T1L_NS (300) |
Definition at line 20 of file led_strip_rmt_dev_idf4.c.
Referenced by led_strip_new_rmt_device().
| esp_err_t led_strip_new_rmt_device | ( | const led_strip_config_t * | led_config, |
| const led_strip_rmt_config_t * | rmt_config, | ||
| led_strip_handle_t * | ret_strip ) |
Create LED strip based on RMT TX channel.
| led_config | LED strip configuration |
| rmt_config | RMT specific configuration |
| ret_strip | Returned LED strip handle |
Definition at line 121 of file led_strip_rmt_dev_idf4.c.
References led_strip_rmt_obj::base, led_strip_rmt_obj::bytes_per_pixel, led_strip_t::clear, led_strip_rmt_config_t::clk_src, led_strip_t::del, ESP_GOTO_ON_ERROR, ESP_OK, led_strip_config_t::flags, led_strip_rmt_config_t::flags, led_strip_config_t::invert_out, led_strip_config_t::led_model, LED_MODEL_SK6812, LED_MODEL_WS2812, led_strip_config_t::led_pixel_format, LED_PIXEL_FORMAT_GRB, LED_PIXEL_FORMAT_GRBW, LED_PIXEL_FORMAT_INVALID, led_strip_rmt_clear(), LED_STRIP_RMT_DEFAULT_MEM_BLOCK_SYMBOLS, LED_STRIP_RMT_DEFAULT_RESOLUTION, LED_STRIP_RMT_DEFAULT_TRANS_QUEUE_SIZE, led_strip_rmt_del(), led_strip_rmt_refresh(), led_strip_rmt_set_pixel(), led_strip_rmt_set_pixel_rgbw(), led_t0h_ticks, led_t0l_ticks, led_t1h_ticks, led_t1l_ticks, led_strip_config_t::max_leds, led_strip_rmt_config_t::mem_block_symbols, led_strip_t::refresh, led_strip_rmt_config_t::resolution_hz, led_strip_rmt_obj::rmt_chan, led_strip_rmt_obj::rmt_channel, rmt_new_led_strip_encoder(), led_strip_t::set_pixel, led_strip_t::set_pixel_rgbw, SK6812_T0H_NS, SK6812_T0L_NS, SK6812_T1H_NS, SK6812_T1L_NS, led_strip_rmt_obj::strip_encoder, led_strip_config_t::strip_gpio_num, led_strip_rmt_obj::strip_len, TAG, led_strip_rmt_config_t::with_dma, ws2812_rmt_adapter(), WS2812_T0H_NS, WS2812_T0L_NS, WS2812_T1H_NS, and WS2812_T1L_NS.
|
static |
Definition at line 105 of file led_strip_rmt_dev_idf4.c.
References led_strip_rmt_obj::buffer, led_strip_rmt_obj::bytes_per_pixel, led_strip_rmt_refresh(), and led_strip_rmt_obj::strip_len.
|
static |
Definition at line 113 of file led_strip_rmt_dev_idf4.c.
References ESP_OK, ESP_RETURN_ON_ERROR, led_strip_rmt_obj::rmt_channel, and TAG.
|
static |
Definition at line 96 of file led_strip_rmt_dev_idf4.c.
References led_strip_rmt_obj::buffer, led_strip_rmt_obj::bytes_per_pixel, ESP_OK, ESP_RETURN_ON_ERROR, LED_STRIP_RESET_MS, led_strip_rmt_obj::rmt_channel, led_strip_rmt_obj::strip_len, and TAG.
Referenced by led_strip_rmt_clear().
|
static |
Definition at line 81 of file led_strip_rmt_dev_idf4.c.
References led_strip_rmt_obj::buffer, led_strip_rmt_obj::bytes_per_pixel, ESP_OK, and TAG.
|
static |
Definition at line 49 of file led_strip_rmt_dev_idf4.c.
References led_t0h_ticks, led_t0l_ticks, led_t1h_ticks, and led_t1l_ticks.
Referenced by led_strip_new_rmt_device().
|
static |
Definition at line 36 of file led_strip_rmt_dev_idf4.c.
Referenced by led_strip_new_rmt_device(), and ws2812_rmt_adapter().
|
static |
Definition at line 38 of file led_strip_rmt_dev_idf4.c.
Referenced by led_strip_new_rmt_device(), and ws2812_rmt_adapter().
|
static |
Definition at line 37 of file led_strip_rmt_dev_idf4.c.
Referenced by led_strip_new_rmt_device(), and ws2812_rmt_adapter().
|
static |
Definition at line 39 of file led_strip_rmt_dev_idf4.c.
Referenced by led_strip_new_rmt_device(), and ws2812_rmt_adapter().
|
static |
Definition at line 15 of file led_strip_rmt_dev_idf4.c.