feat(gptimer): move gptimer retention info from esp_hal_timg to esp_driver_gptimer

- Add gptimer_priv.h with retention type definitions
- Create timer_periph.c files for 8 chips in esp_driver_gptimer
- Remove retention code from esp_hal_timg timer_periph.c (keep signals)
This commit is contained in:
morris
2026-04-21 13:36:17 +08:00
parent 754ec03795
commit 3ca5ff43a2
20 changed files with 1142 additions and 1068 deletions
@@ -12,13 +12,8 @@
#include "soc/timer_group_struct.h"
#include "soc/soc_caps.h"
#include "soc/periph_defs.h"
#include "soc/regdma.h"
#include "hal/timer_ll.h"
#if SOC_HAS(PAU)
#include "soc/retention_periph_defs.h"
#endif // SOC_HAS(PAU)
#ifdef __cplusplus
extern "C" {
#endif
@@ -31,16 +26,6 @@ typedef struct {
extern const soc_timg_gptimer_signal_desc_t soc_timg_gptimer_signals[TIMG_LL_GET(INST_NUM)][TIMG_LL_GET(GPTIMERS_PER_INST)];
#if SOC_HAS(PAU)
typedef struct {
const periph_retention_module_t module; // ID of the GPTimer as a retention module
const regdma_entries_config_t *regdma_entry_array; // Array of regdma entries for retention
const size_t array_size; // Size of the regdma_entry_array
} soc_timg_gptimer_retention_desc_t;
extern const soc_timg_gptimer_retention_desc_t soc_timg_gptimer_retention_infos[TIMG_LL_GET(INST_NUM)][TIMG_LL_GET(GPTIMERS_PER_INST)];
#endif // SOC_HAS(PAU)
#ifdef __cplusplus
}
#endif