mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
refactor(uart): minor update on uart retention feature
This commit is contained in:
@@ -150,10 +150,12 @@ static const regdma_entries_config_t uart1_regdma_entries[] = UART_SLEEP_RETENTI
|
||||
|
||||
const uart_reg_retention_info_t uart_reg_retention_info[SOC_UART_HP_NUM] = {
|
||||
[0] = {
|
||||
.module = SLEEP_RETENTION_MODULE_UART0,
|
||||
.regdma_entry_array = uart0_regdma_entries,
|
||||
.array_size = ARRAY_SIZE(uart0_regdma_entries),
|
||||
},
|
||||
[1] = {
|
||||
.module = SLEEP_RETENTION_MODULE_UART1,
|
||||
.regdma_entry_array = uart1_regdma_entries,
|
||||
.array_size = ARRAY_SIZE(uart1_regdma_entries),
|
||||
},
|
||||
|
||||
@@ -151,10 +151,12 @@ static const regdma_entries_config_t uart1_regdma_entries[] = UART_SLEEP_RETENTI
|
||||
|
||||
const uart_reg_retention_info_t uart_reg_retention_info[SOC_UART_HP_NUM] = {
|
||||
[0] = {
|
||||
.module = SLEEP_RETENTION_MODULE_UART0,
|
||||
.regdma_entry_array = uart0_regdma_entries,
|
||||
.array_size = ARRAY_SIZE(uart0_regdma_entries),
|
||||
},
|
||||
[1] = {
|
||||
.module = SLEEP_RETENTION_MODULE_UART1,
|
||||
.regdma_entry_array = uart1_regdma_entries,
|
||||
.array_size = ARRAY_SIZE(uart1_regdma_entries),
|
||||
},
|
||||
|
||||
@@ -150,10 +150,12 @@ static const regdma_entries_config_t uart1_regdma_entries[] = UART_SLEEP_RETENTI
|
||||
|
||||
const uart_reg_retention_info_t uart_reg_retention_info[SOC_UART_HP_NUM] = {
|
||||
[0] = {
|
||||
.module = SLEEP_RETENTION_MODULE_UART0,
|
||||
.regdma_entry_array = uart0_regdma_entries,
|
||||
.array_size = ARRAY_SIZE(uart0_regdma_entries),
|
||||
},
|
||||
[1] = {
|
||||
.module = SLEEP_RETENTION_MODULE_UART1,
|
||||
.regdma_entry_array = uart1_regdma_entries,
|
||||
.array_size = ARRAY_SIZE(uart1_regdma_entries),
|
||||
},
|
||||
|
||||
@@ -118,10 +118,12 @@ static const regdma_entries_config_t uart1_regdma_entries[] = UART_SLEEP_RETENTI
|
||||
|
||||
const uart_reg_retention_info_t uart_reg_retention_info[SOC_UART_HP_NUM] = {
|
||||
[0] = {
|
||||
.module = SLEEP_RETENTION_MODULE_UART0,
|
||||
.regdma_entry_array = uart0_regdma_entries,
|
||||
.array_size = ARRAY_SIZE(uart0_regdma_entries),
|
||||
},
|
||||
[1] = {
|
||||
.module = SLEEP_RETENTION_MODULE_UART1,
|
||||
.regdma_entry_array = uart1_regdma_entries,
|
||||
.array_size = ARRAY_SIZE(uart1_regdma_entries),
|
||||
},
|
||||
|
||||
@@ -253,22 +253,27 @@ static const regdma_entries_config_t uart4_regdma_entries[] = UART_SLEEP_RETENTI
|
||||
|
||||
const uart_reg_retention_info_t uart_reg_retention_info[SOC_UART_HP_NUM] = {
|
||||
[0] = {
|
||||
.module = SLEEP_RETENTION_MODULE_UART0,
|
||||
.regdma_entry_array = uart0_regdma_entries,
|
||||
.array_size = ARRAY_SIZE(uart0_regdma_entries),
|
||||
},
|
||||
[1] = {
|
||||
.module = SLEEP_RETENTION_MODULE_UART1,
|
||||
.regdma_entry_array = uart1_regdma_entries,
|
||||
.array_size = ARRAY_SIZE(uart1_regdma_entries),
|
||||
},
|
||||
[2] = {
|
||||
.module = SLEEP_RETENTION_MODULE_UART2,
|
||||
.regdma_entry_array = uart2_regdma_entries,
|
||||
.array_size = ARRAY_SIZE(uart2_regdma_entries),
|
||||
},
|
||||
[3] = {
|
||||
.module = SLEEP_RETENTION_MODULE_UART3,
|
||||
.regdma_entry_array = uart3_regdma_entries,
|
||||
.array_size = ARRAY_SIZE(uart3_regdma_entries),
|
||||
},
|
||||
[4] = {
|
||||
.module = SLEEP_RETENTION_MODULE_UART4,
|
||||
.regdma_entry_array = uart4_regdma_entries,
|
||||
.array_size = ARRAY_SIZE(uart4_regdma_entries),
|
||||
},
|
||||
|
||||
@@ -44,7 +44,7 @@ extern const gdma_signal_conn_t gdma_periph_signals;
|
||||
typedef struct {
|
||||
const regdma_entries_config_t *link_list;
|
||||
uint32_t link_num;
|
||||
periph_retention_module_t module_id;
|
||||
const periph_retention_module_t module_id;
|
||||
} gdma_chx_reg_ctx_link_t;
|
||||
|
||||
extern const gdma_chx_reg_ctx_link_t gdma_chx_regs_retention[SOC_GDMA_NUM_GROUPS_MAX][SOC_GDMA_PAIRS_PER_GROUP_MAX];
|
||||
|
||||
@@ -12,7 +12,10 @@
|
||||
#include "soc/uart_pins.h"
|
||||
#include "soc/uart_struct.h"
|
||||
#include "soc/uart_reg.h"
|
||||
#if SOC_PAU_SUPPORTED
|
||||
#include "soc/regdma.h"
|
||||
#include "soc/retention_periph_defs.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -50,8 +53,9 @@ typedef struct {
|
||||
|
||||
extern const uart_signal_conn_t uart_periph_signal[SOC_UART_NUM];
|
||||
|
||||
#if SOC_UART_SUPPORT_SLEEP_RETENTION
|
||||
#if SOC_UART_SUPPORT_SLEEP_RETENTION && SOC_PAU_SUPPORTED
|
||||
typedef struct {
|
||||
const periph_retention_module_t module;
|
||||
const regdma_entries_config_t *regdma_entry_array;
|
||||
uint32_t array_size;
|
||||
} uart_reg_retention_info_t;
|
||||
|
||||
Reference in New Issue
Block a user