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

@@ -11,7 +11,7 @@
#include "soc/soc_caps_full.h"
#include "soc/system_periph_retention.h"
#include "soc/uart_periph.h"
#include "soc/timer_periph.h"
#include "hal/timer_ll.h"
#include "esp_sleep.h"
#include "esp_log.h"
@@ -189,7 +189,7 @@ bool peripheral_domain_pd_allowed(void)
#if SOC_TIMER_SUPPORT_SLEEP_RETENTION
mask.bitmap[SLEEP_RETENTION_MODULE_TG0_TIMER0 >> 5] |= BIT(SLEEP_RETENTION_MODULE_TG0_TIMER0 % 32);
mask.bitmap[SLEEP_RETENTION_MODULE_TG1_TIMER0 >> 5] |= BIT(SLEEP_RETENTION_MODULE_TG1_TIMER0 % 32);
#if SOC_GPTIMER_ATTR(TIMERS_PER_TIMG) > 1
#if TIMG_LL_GET(GPTIMERS_PER_INST) > 1
mask.bitmap[SLEEP_RETENTION_MODULE_TG0_TIMER1 >> 5] |= BIT(SLEEP_RETENTION_MODULE_TG0_TIMER1 % 32);
mask.bitmap[SLEEP_RETENTION_MODULE_TG1_TIMER1 >> 5] |= BIT(SLEEP_RETENTION_MODULE_TG1_TIMER1 % 32);
#endif