/* * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include #include "esp_err.h" #include "led_strip_types.h" #include "muxed_led_strip_types.h" #include "led_strip_rmt.h" #include "esp_idf_version.h" #include #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) #include "driver/rmt_types.h" #endif #ifdef __cplusplus extern "C" { #endif /** * @brief Create multiplexed LED strip based on RMT TX channel * * @param led_config LED strip configuration * @param rmt_config RMT specific configuration * @param cbs Group of RMT TX callback functions * @param ret_strip Returned LED strip handle * @return * - ESP_OK: create LED strip handle successfully * - ESP_ERR_INVALID_ARG: create LED strip handle failed because of invalid argument * - ESP_ERR_NO_MEM: create LED strip handle failed because of out of memory * - ESP_FAIL: create LED strip handle failed because some other error */ esp_err_t muxed_led_strip_new_rmt_device(const muxed_led_strip_config_t *led_config, const led_strip_rmt_config_t *rmt_config, const rmt_tx_event_callbacks_t *cbs, muxed_led_strip_handle_t *ret_strip); #ifdef __cplusplus } #endif