feat(rmt_tx): allow to switch gpio in tx channal

This commit is contained in:
Chen Jichang
2025-04-09 12:03:22 +08:00
parent 756cd17c61
commit 7be85fd8ba
5 changed files with 145 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -181,6 +181,20 @@ esp_err_t rmt_del_sync_manager(rmt_sync_manager_handle_t synchro);
*/
esp_err_t rmt_sync_reset(rmt_sync_manager_handle_t synchro);
/**
* @brief Switch GPIO for RMT TX channel
*
* @param[in] channel RMT TX channel handle
* @param[in] gpio_num New GPIO number to be used
* @param[in] invert_out Whether to invert the output signal
* @return
* - ESP_OK: Switch GPIO successfully
* - ESP_ERR_INVALID_ARG: Switch GPIO failed because of invalid argument
* - ESP_ERR_INVALID_STATE: Switch GPIO failed because channel is not disabled
* - ESP_FAIL: Switch GPIO failed because of other error
*/
esp_err_t rmt_tx_switch_gpio(rmt_channel_handle_t channel, gpio_num_t gpio_num, bool invert_out);
#ifdef __cplusplus
}
#endif