rmt: expose private API to get channel ID

Closes https://github.com/espressif/esp-idf/issues/10596
This commit is contained in:
morris
2023-02-15 14:44:58 +08:00
parent 76989b504a
commit 195f6b99ad
14 changed files with 52 additions and 32 deletions

View File

@@ -169,6 +169,13 @@ esp_err_t rmt_select_periph_clock(rmt_channel_handle_t chan, rmt_clock_source_t
return ret;
}
esp_err_t rmt_get_channel_id(rmt_channel_handle_t channel, int *ret_id)
{
ESP_RETURN_ON_FALSE(channel && ret_id, ESP_ERR_INVALID_ARG, TAG, "invalid argument");
*ret_id = channel->channel_id;
return ESP_OK;
}
esp_err_t rmt_apply_carrier(rmt_channel_handle_t channel, const rmt_carrier_config_t *config)
{
// specially, we allow config to be NULL, means to disable the carrier submodule