feat(uhci): Add uhci (uart-dma) support on esp32c3, esp32c6, esp32s3, esp32p4

This commit is contained in:
C.S.M
2025-04-24 14:08:57 +08:00
parent 182b33efb2
commit 1a3db8e025
30 changed files with 1353 additions and 126 deletions
+59
View File
@@ -0,0 +1,59 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*******************************************************************************
* NOTICE
* The hal is not public api, don't use in application code.
* See readme.md in hal/readme.md
******************************************************************************/
// The HAL layer for UHCI.
// There is no parameter check in the hal layer, so the caller must ensure the correctness of the parameters.
#pragma once
#include "hal/uhci_types.h"
#include "soc/soc_caps.h"
#ifdef __cplusplus
extern "C" {
#endif
#if SOC_UHCI_SUPPORTED
typedef struct uhci_dev_t *uhci_soc_handle_t; // UHCI SOC layer handle
/**
* Context that should be maintained by both the driver and the HAL
*/
typedef struct {
uhci_soc_handle_t dev;
} uhci_hal_context_t;
/**
* @brief Init UHCI hardware instance.
*
* @param hal Context of the HAL layer
* @param uhci_num UHCI number
*
* @return None
*/
void uhci_hal_init(uhci_hal_context_t *hal, int uhci_num);
/**
* @brief Deinit UHCI hardware instance.
*
* @param hal Context of the HAL layer
* @param uhci_num UHCI number
*
* @return None
*/
void uhci_hal_deinit(uhci_hal_context_t *hal);
#endif
#ifdef __cplusplus
}
#endif
+1 -6
View File
@@ -1,14 +1,9 @@
/*
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
// Though the UHCI driver hasn't been published, some types are defined here
// for users to develop over the HAL. See example: controller_hci_uart_esp32c3
#pragma once
#include <stdint.h>