change(gptimer): use private unsafe RCC LL functions in bootloader

This commit is contained in:
morris
2024-04-08 16:05:47 +08:00
parent 1ca8de6e89
commit e8b6d2280d
20 changed files with 63 additions and 83 deletions

View File

@@ -49,7 +49,7 @@ static inline void _timer_ll_enable_bus_clock(int group_id, bool enable)
*
* @param group_id Group ID
*/
static inline void timer_ll_reset_register(int group_id)
static inline void _timer_ll_reset_register(int group_id)
{
(void)group_id;
SYSTEM.perip_rst_en0.timergroup_rst = 1;
@@ -59,7 +59,7 @@ static inline void timer_ll_reset_register(int group_id)
/// use a macro to wrap the function, force the caller to use it in a critical section
/// the critical section needs to declare the __DECLARE_RCC_RC_ATOMIC_ENV variable in advance
#define timer_ll_reset_register(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; timer_ll_reset_register(__VA_ARGS__)
#define timer_ll_reset_register(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; _timer_ll_reset_register(__VA_ARGS__)
/**
* @brief Set clock source for timer
@@ -154,7 +154,7 @@ static inline void timer_ll_set_count_direction(timg_dev_t *hw, uint32_t timer_n
}
/**
* @brief Enable timer, start couting
* @brief Enable timer, start counting
*
* @param hw Timer Group register base address
* @param timer_num Timer number in the group