feat(uart): support uart module sleep retention on c6/h2/p4

This commit is contained in:
Song Ruo Jing
2024-07-31 15:15:11 +08:00
parent cada05a0df
commit 8b8bb72ad4
65 changed files with 704 additions and 274 deletions
-3
View File
@@ -8,10 +8,7 @@
#include "soc/soc_caps.h"
#include "soc/periph_defs.h"
#if SOC_PM_SUPPORT_TOP_PD
#include "soc/regdma.h"
#endif
#ifdef __cplusplus
extern "C" {
+1 -3
View File
@@ -10,9 +10,7 @@
#include "soc/soc_caps.h"
#if SOC_I2C_SUPPORTED // TODO: [ESP32C5] IDF-8694
#include "soc/periph_defs.h"
#if SOC_PM_SUPPORT_TOP_PD
#include "soc/regdma.h"
#endif
#endif // SOC_I2C_SUPPORTED
#ifdef __cplusplus
@@ -32,7 +30,7 @@ typedef struct {
extern const i2c_signal_conn_t i2c_periph_signal[SOC_I2C_NUM];
#if SOC_PM_SUPPORT_TOP_PD
#if SOC_I2C_SUPPORT_SLEEP_RETENTION
typedef struct {
const regdma_entries_config_t *link_list;
uint32_t link_num;
+1
View File
@@ -66,6 +66,7 @@ extern "C" {
#define REGDMA_LINK_PRI_RMT REGDMA_LINK_PRI_GENERAL_PERIPH
#define REGDMA_LINK_PRI_GPTIMER REGDMA_LINK_PRI_GENERAL_PERIPH
#define REGDMA_LINK_PRI_I2C REGDMA_LINK_PRI_GENERAL_PERIPH
#define REGDMA_LINK_PRI_UART REGDMA_LINK_PRI_GENERAL_PERIPH
typedef enum {
REGDMA_LINK_PRI_0 = 0,
+12 -5
View File
@@ -1,17 +1,18 @@
/*
* SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2019-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include "soc/soc_caps.h"
#include "soc/periph_defs.h"
#include "soc/interrupts.h"
#include "soc/gpio_sig_map.h"
#include "soc/io_mux_reg.h"
#include "soc/uart_pins.h"
#include "soc/uart_struct.h"
#include "soc/uart_reg.h"
#include "soc/regdma.h"
#ifdef __cplusplus
extern "C" {
@@ -45,13 +46,19 @@ typedef struct {
typedef struct {
const uart_periph_sig_t pins[SOC_UART_PINS_COUNT];
const uint8_t irq;
union {
const periph_module_t module;
};
} uart_signal_conn_t;
extern const uart_signal_conn_t uart_periph_signal[SOC_UART_NUM];
#if SOC_UART_SUPPORT_SLEEP_RETENTION
typedef struct {
const regdma_entries_config_t *regdma_entry_array;
uint32_t array_size;
} uart_reg_retention_info_t;
extern const uart_reg_retention_info_t uart_reg_retention_info[SOC_UART_HP_NUM];
#endif
#ifdef __cplusplus
}
#endif