mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
refactor(esp_hal_gpio): move some caps definitions to esp_hal_gpio
This commit is contained in:
@@ -15,14 +15,13 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#if SOC_HAS(DEDICATED_GPIO)
|
||||
// helper macros to access module attributes
|
||||
#define SOC_DEDIC_GPIO_ATTR(_attr) SOC_MODULE_ATTR(DEDIC_GPIO, _attr)
|
||||
#include "hal/dedic_gpio_caps.h"
|
||||
|
||||
typedef struct {
|
||||
const int irq; // Interrupt resource (-1 means no interrupt supported)
|
||||
struct {
|
||||
const int in_sig_per_channel[SOC_DEDIC_GPIO_ATTR(IN_CHANS_PER_CPU)];
|
||||
const int out_sig_per_channel[SOC_DEDIC_GPIO_ATTR(OUT_CHANS_PER_CPU)];
|
||||
const int in_sig_per_channel[DEDIC_GPIO_CAPS_GET(IN_CHANS_PER_CPU)];
|
||||
const int out_sig_per_channel[DEDIC_GPIO_CAPS_GET(OUT_CHANS_PER_CPU)];
|
||||
} cores[SOC_CPU_CORES_NUM]; // Signals routed to/from GPIO matrix
|
||||
} dedic_gpio_signal_conn_t;
|
||||
|
||||
|
||||
@@ -16,23 +16,21 @@
|
||||
#include "soc/retention_periph_defs.h"
|
||||
#endif // SOC_HAS(PAU)
|
||||
|
||||
// helper macros to access module attributes
|
||||
#define SOC_SDM_ATTR(_attr) SOC_MODULE_ATTR(SDM, _attr)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if SOC_HAS(SDM)
|
||||
#include "hal/sdm_caps.h"
|
||||
|
||||
typedef struct {
|
||||
const char *module_name; // Module name
|
||||
struct {
|
||||
const int sig_id_matrix; // signal ID in the GPIO matrix
|
||||
} channels[SOC_SDM_ATTR(CHANS_PER_INST)];
|
||||
} channels[SDM_CAPS_GET(CHANS_PER_INST)];
|
||||
} soc_sdm_signal_desc_t;
|
||||
|
||||
extern const soc_sdm_signal_desc_t soc_sdm_signals[SOC_SDM_ATTR(INST_NUM)];
|
||||
extern const soc_sdm_signal_desc_t soc_sdm_signals[SDM_CAPS_GET(INST_NUM)];
|
||||
|
||||
#if SOC_HAS(PAU)
|
||||
|
||||
@@ -42,7 +40,7 @@ typedef struct {
|
||||
const size_t array_size; // Size of the regdma_entry_array
|
||||
} soc_sdm_retention_desc_t;
|
||||
|
||||
extern const soc_sdm_retention_desc_t soc_sdm_retention_infos[SOC_SDM_ATTR(INST_NUM)];
|
||||
extern const soc_sdm_retention_desc_t soc_sdm_retention_infos[SDM_CAPS_GET(INST_NUM)];
|
||||
|
||||
#endif // SOC_HAS(PAU)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user