mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
refactor(etm): move ETM retention info from HAL to driver layer
Move soc_etm_retention_desc_t type definition and soc_etm_retention_info data from hal component to esp_hw_support component, following the pattern of other peripheral retention data (e.g. MWDT). - Create esp_private/etm_retention.h with type and extern declaration - Create port/<target>/etm_retention.c for each target with retention data - Remove hal/<target>/etm_periph.c and hal/include/hal/etm_periph.h - Update esp_etm.c to include the new header - Update CMakeLists.txt in both components
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "soc/soc_caps.h"
|
||||
#include "soc/regdma.h"
|
||||
#if SOC_HAS(ETM)
|
||||
#include "hal/etm_ll.h"
|
||||
#endif
|
||||
#if SOC_HAS(PAU)
|
||||
#include "soc/retention_periph_defs.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if SOC_HAS(PAU)
|
||||
|
||||
typedef struct {
|
||||
periph_retention_module_t module; // ID of the ETM as a retention module
|
||||
const regdma_entries_config_t *regdma_entry_array; // Array of regdma entries for retention
|
||||
uint32_t array_size; // Size of the regdma_entry_array
|
||||
} soc_etm_retention_desc_t;
|
||||
|
||||
extern const soc_etm_retention_desc_t soc_etm_retention_info[ETM_LL_GET(INST_NUM)];
|
||||
|
||||
#endif // SOC_HAS(PAU)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user