refactor(esp_clk_tree): rename esp_clk_tree_enable_src API

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Chen Chen
2026-09-20 16:49:24 +08:00
co-authored by Cursor
parent 04cbfc2242
commit 4b85046a4a
79 changed files with 317 additions and 265 deletions
+1 -1
View File
@@ -117,7 +117,7 @@ static void gptimer_unregister_from_group(gptimer_t *timer)
static esp_err_t gptimer_destroy(gptimer_t *timer)
{
if (timer->clk_src) {
ESP_RETURN_ON_ERROR(esp_clk_tree_enable_src((soc_module_clk_t)(timer->clk_src), false), TAG, "clock source disable failed");
ESP_RETURN_ON_ERROR(esp_clk_tree_release_src((soc_module_clk_t)(timer->clk_src)), TAG, "clock source disable failed");
}
#if CONFIG_PM_ENABLE
if (timer->pm_lock) {
@@ -91,7 +91,7 @@ esp_err_t gptimer_select_periph_clock(gptimer_t *timer, gptimer_clock_source_t s
uint32_t counter_src_hz = 0;
int timer_id = timer->timer_id;
int group_id = timer->group->group_id;
ESP_RETURN_ON_ERROR(esp_clk_tree_enable_src(src_clk, true), TAG, "clock source enable failed");
ESP_RETURN_ON_ERROR(esp_clk_tree_acquire_src(src_clk), TAG, "clock source enable failed");
timer->clk_src = src_clk;
// get clock source frequency