mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-16 06:54:22 +00:00
refactor(gptimer): use group_id in clock ctrl functions
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -76,12 +76,14 @@ static inline void _timer_ll_reset_register(int group_id)
|
||||
/**
|
||||
* @brief Set clock source for timer
|
||||
*
|
||||
* @param hw Timer Group register base address
|
||||
* @param group_id Group ID
|
||||
* @param timer_num Timer number in the group
|
||||
* @param clk_src Clock source
|
||||
*/
|
||||
static inline void timer_ll_set_clock_source(timg_dev_t *hw, uint32_t timer_num, gptimer_clock_source_t clk_src)
|
||||
static inline void timer_ll_set_clock_source(int group_id, uint32_t timer_num, gptimer_clock_source_t clk_src)
|
||||
{
|
||||
(void)group_id;
|
||||
(void)timer_num;
|
||||
switch (clk_src) {
|
||||
case GPTIMER_CLK_SRC_APB:
|
||||
break;
|
||||
@@ -96,13 +98,13 @@ static inline void timer_ll_set_clock_source(timg_dev_t *hw, uint32_t timer_num,
|
||||
*
|
||||
* @note This function is not optional, created for backward compatible.
|
||||
*
|
||||
* @param hw Timer Group register base address
|
||||
* @param group_id Group ID
|
||||
* @param timer_num Timer index in the group
|
||||
* @param en true to enable, false to disable
|
||||
*/
|
||||
static inline void timer_ll_enable_clock(timg_dev_t *hw, uint32_t timer_num, bool en)
|
||||
static inline void timer_ll_enable_clock(int group_id, uint32_t timer_num, bool en)
|
||||
{
|
||||
(void)hw;
|
||||
(void)group_id;
|
||||
(void)timer_num;
|
||||
(void)en;
|
||||
}
|
||||
|
Reference in New Issue
Block a user