refactor(gptimer): clean up SOC capabilities for GPTIMER and Timer Group

- Remove GPTIMER and TIMG related definitions from soc_caps_full.h files
- Move timer peripheral definitions to appropriate HAL layer files
- Update references across components to use proper HAL abstractions
- Consolidate timer group and GPTIMER capabilities organization
- Ensure consistent timer configuration across all ESP32 variants

This refactoring improves the separation of concerns between SOC
capabilities and HAL implementations for timer-related functionality.
This commit is contained in:
morris
2025-09-30 18:08:23 +08:00
parent 56c3dc4755
commit e8de5b5a95
80 changed files with 357 additions and 331 deletions

View File

@@ -14,19 +14,25 @@
#include "soc/timer_group_struct.h"
#include "soc/system_struct.h"
#ifdef __cplusplus
extern "C" {
#endif
// Total number of general purpose timers
#define TIMER_LL_GPTIMERS_TOTAL (TIMG_LL_INST_NUM * TIMG_LL_GPTIMERS_PER_INST)
// Get timer group register base address with giving group number
#define TIMER_LL_GET_HW(group_id) ((group_id == 0) ? (&TIMERG0) : (&TIMERG1))
// Bit width of GPTIMER counter
#define TIMER_LL_COUNTER_BIT_WIDTH 54
// Get alarm interrupt mask with the given timer ID
#define TIMER_LL_EVENT_ALARM(timer_id) (1 << (timer_id))
// Support APB as function clock
#define TIMER_LL_FUNC_CLOCK_SUPPORT_APB 1
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Set clock source for timer
*