mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-01 14:34:31 +00:00
feat(uhci): Add uhci (uart-dma) support on esp32c3, esp32c6, esp32s3, esp32p4
This commit is contained in:
@@ -19,6 +19,10 @@ config SOC_GDMA_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_UHCI_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_AHB_GDMA_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
@@ -1015,6 +1019,10 @@ config SOC_UART_WAKEUP_SUPPORT_ACTIVE_THRESH_MODE
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_UHCI_NUM
|
||||
int
|
||||
default 1
|
||||
|
||||
config SOC_COEX_HW_PTI
|
||||
bool
|
||||
default y
|
||||
|
@@ -21,6 +21,7 @@
|
||||
#define SOC_DEDICATED_GPIO_SUPPORTED 1
|
||||
#define SOC_UART_SUPPORTED 1
|
||||
#define SOC_GDMA_SUPPORTED 1
|
||||
#define SOC_UHCI_SUPPORTED 1
|
||||
#define SOC_AHB_GDMA_SUPPORTED 1
|
||||
#define SOC_GPTIMER_SUPPORTED 1
|
||||
#define SOC_TWAI_SUPPORTED 1
|
||||
@@ -424,6 +425,9 @@
|
||||
|
||||
#define SOC_UART_WAKEUP_SUPPORT_ACTIVE_THRESH_MODE (1)
|
||||
|
||||
/*--------------------------- UHCI CAPS -------------------------------------*/
|
||||
#define SOC_UHCI_NUM (1UL)
|
||||
|
||||
/*-------------------------- COEXISTENCE HARDWARE PTI CAPS -------------------------------*/
|
||||
#define SOC_COEX_HW_PTI (1)
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -10,8 +10,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef volatile struct uhci_dev_s {
|
||||
union {
|
||||
typedef struct uhci_dev_t {
|
||||
volatile union {
|
||||
struct {
|
||||
uint32_t tx_rst: 1; /*Write 1 then write 0 to this bit to reset decode state machine.*/
|
||||
uint32_t rx_rst: 1; /*Write 1 then write 0 to this bit to reset encode state machine.*/
|
||||
@@ -30,7 +30,7 @@ typedef volatile struct uhci_dev_s {
|
||||
};
|
||||
uint32_t val;
|
||||
} conf0;
|
||||
union {
|
||||
volatile union {
|
||||
struct {
|
||||
uint32_t rx_start: 1; /*a*/
|
||||
uint32_t tx_start: 1; /*a*/
|
||||
@@ -45,7 +45,7 @@ typedef volatile struct uhci_dev_s {
|
||||
};
|
||||
uint32_t val;
|
||||
} int_raw;
|
||||
union {
|
||||
volatile union {
|
||||
struct {
|
||||
uint32_t rx_start: 1; /*a*/
|
||||
uint32_t tx_start: 1; /*a*/
|
||||
@@ -60,7 +60,7 @@ typedef volatile struct uhci_dev_s {
|
||||
};
|
||||
uint32_t val;
|
||||
} int_st;
|
||||
union {
|
||||
volatile union {
|
||||
struct {
|
||||
uint32_t rx_start: 1; /*a*/
|
||||
uint32_t tx_start: 1; /*a*/
|
||||
@@ -75,7 +75,7 @@ typedef volatile struct uhci_dev_s {
|
||||
};
|
||||
uint32_t val;
|
||||
} int_ena;
|
||||
union {
|
||||
volatile union {
|
||||
struct {
|
||||
uint32_t rx_start: 1; /*a*/
|
||||
uint32_t tx_start: 1; /*a*/
|
||||
@@ -90,7 +90,7 @@ typedef volatile struct uhci_dev_s {
|
||||
};
|
||||
uint32_t val;
|
||||
} int_clr;
|
||||
union {
|
||||
volatile union {
|
||||
struct {
|
||||
uint32_t check_sum_en: 1; /*a*/
|
||||
uint32_t check_seq_en: 1; /*a*/
|
||||
@@ -106,7 +106,7 @@ typedef volatile struct uhci_dev_s {
|
||||
};
|
||||
uint32_t val;
|
||||
} conf1;
|
||||
union {
|
||||
volatile union {
|
||||
struct {
|
||||
uint32_t rx_err_cause: 3; /*a*/
|
||||
uint32_t decode_state: 3; /*a*/
|
||||
@@ -114,14 +114,14 @@ typedef volatile struct uhci_dev_s {
|
||||
};
|
||||
uint32_t val;
|
||||
} state0;
|
||||
union {
|
||||
volatile union {
|
||||
struct {
|
||||
uint32_t encode_state: 3; /*a*/
|
||||
uint32_t reserved3: 29;
|
||||
};
|
||||
uint32_t val;
|
||||
} state1;
|
||||
union {
|
||||
volatile union {
|
||||
struct {
|
||||
uint32_t tx_c0_esc_en: 1; /*a*/
|
||||
uint32_t tx_db_esc_en: 1; /*a*/
|
||||
@@ -135,7 +135,7 @@ typedef volatile struct uhci_dev_s {
|
||||
};
|
||||
uint32_t val;
|
||||
} escape_conf;
|
||||
union {
|
||||
volatile union {
|
||||
struct {
|
||||
uint32_t txfifo_timeout: 8; /*a*/
|
||||
uint32_t txfifo_timeout_shift: 3; /*a*/
|
||||
@@ -147,7 +147,7 @@ typedef volatile struct uhci_dev_s {
|
||||
};
|
||||
uint32_t val;
|
||||
} hung_conf;
|
||||
union {
|
||||
volatile union {
|
||||
struct {
|
||||
uint32_t ack_num: 3;
|
||||
uint32_t ack_num_load: 1; /*a*/
|
||||
@@ -156,7 +156,7 @@ typedef volatile struct uhci_dev_s {
|
||||
uint32_t val;
|
||||
} ack_num;
|
||||
uint32_t rx_head; /*a*/
|
||||
union {
|
||||
volatile union {
|
||||
struct {
|
||||
uint32_t single_send_num: 3; /*a*/
|
||||
uint32_t single_send_en: 1; /*a*/
|
||||
@@ -166,10 +166,10 @@ typedef volatile struct uhci_dev_s {
|
||||
};
|
||||
uint32_t val;
|
||||
} quick_sent;
|
||||
struct {
|
||||
volatile struct {
|
||||
uint32_t w_data[2]; /*a*/
|
||||
} q_data[7];
|
||||
union {
|
||||
volatile union {
|
||||
struct {
|
||||
uint32_t seper_char: 8; /*a*/
|
||||
uint32_t seper_esc_char0: 8; /*a*/
|
||||
@@ -178,7 +178,7 @@ typedef volatile struct uhci_dev_s {
|
||||
};
|
||||
uint32_t val;
|
||||
} esc_conf0;
|
||||
union {
|
||||
volatile union {
|
||||
struct {
|
||||
uint32_t seq0: 8; /*a*/
|
||||
uint32_t seq0_char0: 8; /*a*/
|
||||
@@ -187,7 +187,7 @@ typedef volatile struct uhci_dev_s {
|
||||
};
|
||||
uint32_t val;
|
||||
} esc_conf1;
|
||||
union {
|
||||
volatile union {
|
||||
struct {
|
||||
uint32_t seq1: 8; /*a*/
|
||||
uint32_t seq1_char0: 8; /*a*/
|
||||
@@ -196,7 +196,7 @@ typedef volatile struct uhci_dev_s {
|
||||
};
|
||||
uint32_t val;
|
||||
} esc_conf2;
|
||||
union {
|
||||
volatile union {
|
||||
struct {
|
||||
uint32_t seq2: 8; /*a*/
|
||||
uint32_t seq2_char0: 8; /*a*/
|
||||
@@ -205,14 +205,14 @@ typedef volatile struct uhci_dev_s {
|
||||
};
|
||||
uint32_t val;
|
||||
} esc_conf3;
|
||||
union {
|
||||
volatile union {
|
||||
struct {
|
||||
uint32_t thrs: 13; /*a*/
|
||||
uint32_t reserved13:19;
|
||||
};
|
||||
uint32_t val;
|
||||
} pkt_thres;
|
||||
uint32_t date; /*a*/
|
||||
volatile uint32_t date; /*a*/
|
||||
} uhci_dev_t;
|
||||
extern uhci_dev_t UHCI0;
|
||||
#ifdef __cplusplus
|
||||
|
Reference in New Issue
Block a user