mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-08 23:35:33 +00:00
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:
@@ -15,19 +15,25 @@
|
||||
#include "soc/pcr_struct.h"
|
||||
#include "soc/soc_etm_source.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 RC_FAST as function clock
|
||||
#define TIMER_LL_FUNC_CLOCK_SUPPORT_RC_FAST 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define TIMER_LL_ETM_TASK_TABLE(group, timer, task) \
|
||||
(uint32_t [2][1][GPTIMER_ETM_TASK_MAX]){{{ \
|
||||
[GPTIMER_ETM_TASK_START_COUNT] = TG0_TASK_CNT_START_TIMER0, \
|
||||
|
||||
Reference in New Issue
Block a user