mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
Merge branch 'refactor/bitscrambler_in_esp_hal_dma_v6.0' into 'release/v6.0'
refactor(hal): bitscrambler hal -> esp_hal_dma, usj hal -> esp_hal_usb (v6.0) See merge request espressif/esp-idf!43700
This commit is contained in:
@@ -10,6 +10,7 @@ if(CONFIG_SOC_BITSCRAMBLER_SUPPORTED)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
idf_component_register(SRCS ${srcs}
|
idf_component_register(SRCS ${srcs}
|
||||||
|
REQUIRES "esp_hal_dma"
|
||||||
PRIV_REQUIRES "esp_mm"
|
PRIV_REQUIRES "esp_mm"
|
||||||
INCLUDE_DIRS "include"
|
INCLUDE_DIRS "include"
|
||||||
LDFRAGMENTS "linker.lf")
|
LDFRAGMENTS "linker.lf")
|
||||||
|
|||||||
@@ -9,9 +9,6 @@
|
|||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#include "hal/bitscrambler_types.h"
|
#include "hal/bitscrambler_types.h"
|
||||||
#if SOC_BITSCRAMBLER_SUPPORTED
|
|
||||||
#include "soc/bitscrambler_peri_select.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|||||||
@@ -3,11 +3,10 @@
|
|||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
#include "soc/gdma_channel.h"
|
#include "hal/gdma_channel.h"
|
||||||
#include "bitscrambler_soc_specific.h"
|
#include "bitscrambler_soc_specific.h"
|
||||||
|
|
||||||
// Note: these are indexed by the values of the SOC_BITSCRAMBLER_ATTACH_ defines
|
// Note: these are indexed by the values of the SOC_BITSCRAMBLER_ATTACH_ defines in bitscrambler_peri_select.h
|
||||||
// in soc/bitscrambler_peri_select.h
|
|
||||||
// This map is used by the bitscrambler loopback driver only.
|
// This map is used by the bitscrambler loopback driver only.
|
||||||
|
|
||||||
const bitscrambler_periph_desc_t g_bitscrambler_periph_desc[] = {
|
const bitscrambler_periph_desc_t g_bitscrambler_periph_desc[] = {
|
||||||
|
|||||||
@@ -3,11 +3,10 @@
|
|||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
#include "soc/gdma_channel.h"
|
#include "hal/gdma_channel.h"
|
||||||
#include "bitscrambler_soc_specific.h"
|
#include "bitscrambler_soc_specific.h"
|
||||||
|
|
||||||
// Note: these are indexed by the values of the SOC_BITSCRAMBLER_ATTACH_ defines
|
// Note: these are indexed by the values of the SOC_BITSCRAMBLER_ATTACH_ defines in bitscrambler_peri_select.h
|
||||||
// in soc/bitscrambler_peri_select.h
|
|
||||||
// This map is used by the bitscrambler loopback driver only.
|
// This map is used by the bitscrambler loopback driver only.
|
||||||
|
|
||||||
const bitscrambler_periph_desc_t g_bitscrambler_periph_desc[] = {
|
const bitscrambler_periph_desc_t g_bitscrambler_periph_desc[] = {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "esp_private/gdma.h"
|
#include "esp_private/gdma.h"
|
||||||
#include "soc/bitscrambler_peri_select.h"
|
#include "hal/bitscrambler_peri_select.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|||||||
@@ -3,3 +3,4 @@ components/esp_driver_bitscrambler/test_apps/bitscrambler:
|
|||||||
- if: SOC_BITSCRAMBLER_SUPPORTED != 1
|
- if: SOC_BITSCRAMBLER_SUPPORTED != 1
|
||||||
depends_components:
|
depends_components:
|
||||||
- esp_driver_bitscrambler
|
- esp_driver_bitscrambler
|
||||||
|
- esp_hal_dma
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include "freertos/queue.h"
|
#include "freertos/queue.h"
|
||||||
#include "freertos/idf_additions.h"
|
#include "freertos/idf_additions.h"
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#include "soc/gdma_channel.h"
|
|
||||||
#include "soc/parlio_periph.h"
|
#include "soc/parlio_periph.h"
|
||||||
#include "hal/parlio_types.h"
|
#include "hal/parlio_types.h"
|
||||||
#include "hal/parlio_hal.h"
|
#include "hal/parlio_hal.h"
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
#include "esp_check.h"
|
#include "esp_check.h"
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#include "soc/gdma_channel.h"
|
|
||||||
#include "soc/rmt_periph.h"
|
#include "soc/rmt_periph.h"
|
||||||
#include "hal/rmt_types.h"
|
#include "hal/rmt_types.h"
|
||||||
#include "hal/rmt_hal.h"
|
#include "hal/rmt_hal.h"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ endif()
|
|||||||
if(${target} STREQUAL "linux")
|
if(${target} STREQUAL "linux")
|
||||||
set(priv_requires esp_ringbuf esp_timer)
|
set(priv_requires esp_ringbuf esp_timer)
|
||||||
else()
|
else()
|
||||||
set(priv_requires esp_driver_gpio esp_ringbuf esp_pm esp_timer)
|
set(priv_requires esp_driver_gpio esp_ringbuf esp_pm esp_timer esp_hal_usb)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
idf_component_register(SRCS ${srcs}
|
idf_component_register(SRCS ${srcs}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ components/esp_driver_usb_serial_jtag/test_apps/usb_serial_jtag:
|
|||||||
- vfs
|
- vfs
|
||||||
- esp_driver_gpio
|
- esp_driver_gpio
|
||||||
- esp_driver_usb_serial_jtag
|
- esp_driver_usb_serial_jtag
|
||||||
|
- esp_hal_usb
|
||||||
|
|
||||||
components/esp_driver_usb_serial_jtag/test_apps/usb_serial_jtag_vfs:
|
components/esp_driver_usb_serial_jtag/test_apps/usb_serial_jtag_vfs:
|
||||||
disable:
|
disable:
|
||||||
@@ -28,3 +29,4 @@ components/esp_driver_usb_serial_jtag/test_apps/usb_serial_jtag_vfs:
|
|||||||
depends_components:
|
depends_components:
|
||||||
- vfs
|
- vfs
|
||||||
- esp_driver_usb_serial_jtag
|
- esp_driver_usb_serial_jtag
|
||||||
|
- esp_hal_usb
|
||||||
|
|||||||
+1
-3
@@ -4,7 +4,6 @@
|
|||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
@@ -29,7 +28,7 @@ extern "C" {
|
|||||||
*
|
*
|
||||||
* @param hw BitScrambler hardware instance address.
|
* @param hw BitScrambler hardware instance address.
|
||||||
* @param dir Direction, BITSCRAMBLER_DIR_TX or BITSCRAMBLER_DIR_RX
|
* @param dir Direction, BITSCRAMBLER_DIR_TX or BITSCRAMBLER_DIR_RX
|
||||||
* @param peri Peripheral to select, should pick the value from soc/bitscrambler_peri_select.h
|
* @param peri Peripheral to select, should pick the value from bitscrambler_peri_select.h
|
||||||
*/
|
*/
|
||||||
static inline void bitscrambler_ll_select_peripheral(bitscrambler_dev_t *hw, bitscrambler_direction_t dir, int peri)
|
static inline void bitscrambler_ll_select_peripheral(bitscrambler_dev_t *hw, bitscrambler_direction_t dir, int peri)
|
||||||
{
|
{
|
||||||
@@ -62,7 +61,6 @@ static inline void bitscrambler_ll_disable(bitscrambler_dev_t *hw, bitscrambler_
|
|||||||
hw->ctrl[dir].ena = 0;
|
hw->ctrl[dir].ena = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Write a word to the instruction memory
|
* @brief Write a word to the instruction memory
|
||||||
*
|
*
|
||||||
+1
-3
@@ -4,7 +4,6 @@
|
|||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
@@ -29,7 +28,7 @@ extern "C" {
|
|||||||
*
|
*
|
||||||
* @param hw BitScrambler hardware instance address.
|
* @param hw BitScrambler hardware instance address.
|
||||||
* @param dir Direction, BITSCRAMBLER_DIR_TX or BITSCRAMBLER_DIR_RX
|
* @param dir Direction, BITSCRAMBLER_DIR_TX or BITSCRAMBLER_DIR_RX
|
||||||
* @param peri Peripheral to select, should pick the value from soc/bitscrambler_peri_select.h
|
* @param peri Peripheral to select, should pick the value from bitscrambler_peri_select.h
|
||||||
*/
|
*/
|
||||||
static inline void bitscrambler_ll_select_peripheral(bitscrambler_dev_t *hw, bitscrambler_direction_t dir, int peri)
|
static inline void bitscrambler_ll_select_peripheral(bitscrambler_dev_t *hw, bitscrambler_direction_t dir, int peri)
|
||||||
{
|
{
|
||||||
@@ -62,7 +61,6 @@ static inline void bitscrambler_ll_disable(bitscrambler_dev_t *hw, bitscrambler_
|
|||||||
hw->ctrl[dir].ena = 0;
|
hw->ctrl[dir].ena = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Write a word to the instruction memory
|
* @brief Write a word to the instruction memory
|
||||||
*
|
*
|
||||||
+4
-1
@@ -6,6 +6,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if __has_include("hal/bitscrambler_peri_select.h")
|
||||||
|
#include "hal/bitscrambler_peri_select.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@@ -27,7 +31,6 @@ typedef enum {
|
|||||||
BITSCRAMBLER_LUT_WIDTH_32BIT = 2, /*!< 32-bit LUT */
|
BITSCRAMBLER_LUT_WIDTH_32BIT = 2, /*!< 32-bit LUT */
|
||||||
} bitscrambler_lut_width_t;
|
} bitscrambler_lut_width_t;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief EOF signal generating mode of bitscrambler
|
* @brief EOF signal generating mode of bitscrambler
|
||||||
*/
|
*/
|
||||||
@@ -7,10 +7,13 @@ endif()
|
|||||||
set(includes "include")
|
set(includes "include")
|
||||||
set(srcs)
|
set(srcs)
|
||||||
|
|
||||||
|
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${target}/include")
|
||||||
|
list(APPEND includes "${target}/include")
|
||||||
|
endif()
|
||||||
|
|
||||||
# USB-DWC related source files and USB FSLS PHY wrapper
|
# USB-DWC related source files and USB FSLS PHY wrapper
|
||||||
if(CONFIG_SOC_USB_OTG_SUPPORTED)
|
if(CONFIG_SOC_USB_OTG_SUPPORTED)
|
||||||
list(APPEND srcs "usb_dwc_hal.c" "usb_wrap_hal.c" "${target}/usb_dwc_periph.c")
|
list(APPEND srcs "usb_dwc_hal.c" "usb_wrap_hal.c" "${target}/usb_dwc_periph.c")
|
||||||
list(APPEND includes "${target}/include")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# USB UTMI PHY
|
# USB UTMI PHY
|
||||||
@@ -18,6 +21,11 @@ if(CONFIG_SOC_USB_UTMI_PHY_NUM GREATER 0)
|
|||||||
list(APPEND srcs "usb_utmi_hal.c")
|
list(APPEND srcs "usb_utmi_hal.c")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# USB Serial JTAG
|
||||||
|
if(CONFIG_SOC_USB_SERIAL_JTAG_SUPPORTED)
|
||||||
|
list(APPEND srcs "usb_serial_jtag_hal.c")
|
||||||
|
endif()
|
||||||
|
|
||||||
idf_component_register(SRCS ${srcs}
|
idf_component_register(SRCS ${srcs}
|
||||||
INCLUDE_DIRS ${includes}
|
INCLUDE_DIRS ${includes}
|
||||||
REQUIRES soc hal)
|
REQUIRES soc hal)
|
||||||
|
|||||||
@@ -19,18 +19,16 @@ The USB HAL is structured in two main sub-layers:
|
|||||||
|
|
||||||
This HAL supports various USB controller and PHY types depending on the ESP chip:
|
This HAL supports various USB controller and PHY types depending on the ESP chip:
|
||||||
|
|
||||||
- **USB-DWC (DesignWare USB Controller)**: The main USB OTG controller available on:
|
- **USB-DWC (DesignWare USB Controller)**: The main USB OTG controller supporting USB Host and Device modes
|
||||||
- ESP32-S2
|
|
||||||
- ESP32-S3
|
- **USB Serial JTAG**: A special USB peripheral that combines USB CDC-ACM functionality with JTAG debugging capabilities
|
||||||
- ESP32-H4
|
|
||||||
- ESP32-P4
|
|
||||||
|
|
||||||
- **USB WRAP**: A wrapper/peripheral controller that provides additional USB functionality and GPIO matrix integration
|
- **USB WRAP**: A wrapper/peripheral controller that provides additional USB functionality and GPIO matrix integration
|
||||||
|
|
||||||
- **USB PHY Types**:
|
- **USB PHY Types**:
|
||||||
- **FSLS (Full Speed/Low Speed) Internal PHY**: Built-in PHY supporting USB Full Speed and Low Speed operation
|
- **FSLS (Full Speed/Low Speed) Internal PHY**: Built-in PHY supporting USB Full Speed and Low Speed operation
|
||||||
- **FSLS External PHY**: Support for external FSLS PHY via GPIO matrix
|
- **FSLS External PHY**: Support for external FSLS PHY via GPIO matrix
|
||||||
- **UTMI PHY**: UTMI+ compliant PHY interface (available on ESP32-P4)
|
- **UTMI PHY**: UTMI+ compliant PHY interface for High Speed USB support
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
|||||||
+7
-5
@@ -31,7 +31,6 @@ typedef enum {
|
|||||||
USB_SERIAL_JTAG_INTR_EP1_ZERO_PAYLOAD = (1 << 10),
|
USB_SERIAL_JTAG_INTR_EP1_ZERO_PAYLOAD = (1 << 10),
|
||||||
} usb_serial_jtag_ll_intr_t;
|
} usb_serial_jtag_ll_intr_t;
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@@ -116,7 +115,9 @@ static inline int usb_serial_jtag_ll_read_rxfifo(uint8_t *buf, uint32_t rd_len)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (int)rd_len; i++) {
|
for (i = 0; i < (int)rd_len; i++) {
|
||||||
if (!USB_SERIAL_JTAG.ep1_conf.serial_out_ep_data_avail) break;
|
if (!USB_SERIAL_JTAG.ep1_conf.serial_out_ep_data_avail) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
buf[i] = USB_SERIAL_JTAG.ep1.rdwr_byte;
|
buf[i] = USB_SERIAL_JTAG.ep1.rdwr_byte;
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
@@ -135,7 +136,9 @@ static inline int usb_serial_jtag_ll_write_txfifo(const uint8_t *buf, uint32_t w
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (int)wr_len; i++) {
|
for (i = 0; i < (int)wr_len; i++) {
|
||||||
if (!USB_SERIAL_JTAG.ep1_conf.serial_in_ep_data_free) break;
|
if (!USB_SERIAL_JTAG.ep1_conf.serial_in_ep_data_free) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
USB_SERIAL_JTAG.ep1.rdwr_byte = buf[i];
|
USB_SERIAL_JTAG.ep1.rdwr_byte = buf[i];
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
@@ -178,7 +181,7 @@ static inline int usb_serial_jtag_ll_txfifo_writable(void)
|
|||||||
*/
|
*/
|
||||||
static inline void usb_serial_jtag_ll_txfifo_flush(void)
|
static inline void usb_serial_jtag_ll_txfifo_flush(void)
|
||||||
{
|
{
|
||||||
USB_SERIAL_JTAG.ep1_conf.wr_done=1;
|
USB_SERIAL_JTAG.ep1_conf.wr_done = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------- USB PHY Control ---------------------------- */
|
/* ---------------------------- USB PHY Control ---------------------------- */
|
||||||
@@ -335,7 +338,6 @@ FORCE_INLINE_ATTR bool usb_serial_jtag_ll_module_is_enabled(void)
|
|||||||
usb_serial_jtag_ll_module_is_enabled(__VA_ARGS__); \
|
usb_serial_jtag_ll_module_is_enabled(__VA_ARGS__); \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
+7
-3
@@ -115,7 +115,9 @@ static inline int usb_serial_jtag_ll_read_rxfifo(uint8_t *buf, uint32_t rd_len)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (int)rd_len; i++) {
|
for (i = 0; i < (int)rd_len; i++) {
|
||||||
if (!USB_SERIAL_JTAG.ep1_conf.serial_out_ep_data_avail) break;
|
if (!USB_SERIAL_JTAG.ep1_conf.serial_out_ep_data_avail) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
buf[i] = USB_SERIAL_JTAG.ep1.val;
|
buf[i] = USB_SERIAL_JTAG.ep1.val;
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
@@ -134,7 +136,9 @@ static inline int usb_serial_jtag_ll_write_txfifo(const uint8_t *buf, uint32_t w
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (int)wr_len; i++) {
|
for (i = 0; i < (int)wr_len; i++) {
|
||||||
if (!USB_SERIAL_JTAG.ep1_conf.serial_in_ep_data_free) break;
|
if (!USB_SERIAL_JTAG.ep1_conf.serial_in_ep_data_free) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
USB_SERIAL_JTAG.ep1.val = buf[i];
|
USB_SERIAL_JTAG.ep1.val = buf[i];
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
@@ -177,7 +181,7 @@ static inline int usb_serial_jtag_ll_txfifo_writable(void)
|
|||||||
*/
|
*/
|
||||||
static inline void usb_serial_jtag_ll_txfifo_flush(void)
|
static inline void usb_serial_jtag_ll_txfifo_flush(void)
|
||||||
{
|
{
|
||||||
USB_SERIAL_JTAG.ep1_conf.wr_done=1;
|
USB_SERIAL_JTAG.ep1_conf.wr_done = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
+7
-4
@@ -31,7 +31,6 @@ typedef enum {
|
|||||||
USB_SERIAL_JTAG_INTR_EP1_ZERO_PAYLOAD = (1 << 10),
|
USB_SERIAL_JTAG_INTR_EP1_ZERO_PAYLOAD = (1 << 10),
|
||||||
} usb_serial_jtag_ll_intr_t;
|
} usb_serial_jtag_ll_intr_t;
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@@ -116,7 +115,9 @@ static inline int usb_serial_jtag_ll_read_rxfifo(uint8_t *buf, uint32_t rd_len)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (int)rd_len; i++) {
|
for (i = 0; i < (int)rd_len; i++) {
|
||||||
if (!USB_SERIAL_JTAG.ep1_conf.serial_out_ep_data_avail) break;
|
if (!USB_SERIAL_JTAG.ep1_conf.serial_out_ep_data_avail) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
buf[i] = USB_SERIAL_JTAG.ep1.rdwr_byte;
|
buf[i] = USB_SERIAL_JTAG.ep1.rdwr_byte;
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
@@ -135,7 +136,9 @@ static inline int usb_serial_jtag_ll_write_txfifo(const uint8_t *buf, uint32_t w
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (int)wr_len; i++) {
|
for (i = 0; i < (int)wr_len; i++) {
|
||||||
if (!USB_SERIAL_JTAG.ep1_conf.serial_in_ep_data_free) break;
|
if (!USB_SERIAL_JTAG.ep1_conf.serial_in_ep_data_free) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
USB_SERIAL_JTAG.ep1.rdwr_byte = buf[i];
|
USB_SERIAL_JTAG.ep1.rdwr_byte = buf[i];
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
@@ -178,7 +181,7 @@ static inline int usb_serial_jtag_ll_txfifo_writable(void)
|
|||||||
*/
|
*/
|
||||||
static inline void usb_serial_jtag_ll_txfifo_flush(void)
|
static inline void usb_serial_jtag_ll_txfifo_flush(void)
|
||||||
{
|
{
|
||||||
USB_SERIAL_JTAG.ep1_conf.wr_done=1;
|
USB_SERIAL_JTAG.ep1_conf.wr_done = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
+7
-3
@@ -115,7 +115,9 @@ static inline int usb_serial_jtag_ll_read_rxfifo(uint8_t *buf, uint32_t rd_len)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (int)rd_len; i++) {
|
for (i = 0; i < (int)rd_len; i++) {
|
||||||
if (!USB_SERIAL_JTAG.ep1_conf.serial_out_ep_data_avail) break;
|
if (!USB_SERIAL_JTAG.ep1_conf.serial_out_ep_data_avail) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
buf[i] = USB_SERIAL_JTAG.ep1.val;
|
buf[i] = USB_SERIAL_JTAG.ep1.val;
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
@@ -134,7 +136,9 @@ static inline int usb_serial_jtag_ll_write_txfifo(const uint8_t *buf, uint32_t w
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (int)wr_len; i++) {
|
for (i = 0; i < (int)wr_len; i++) {
|
||||||
if (!USB_SERIAL_JTAG.ep1_conf.serial_in_ep_data_free) break;
|
if (!USB_SERIAL_JTAG.ep1_conf.serial_in_ep_data_free) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
USB_SERIAL_JTAG.ep1.val = buf[i];
|
USB_SERIAL_JTAG.ep1.val = buf[i];
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
@@ -177,7 +181,7 @@ static inline int usb_serial_jtag_ll_txfifo_writable(void)
|
|||||||
*/
|
*/
|
||||||
static inline void usb_serial_jtag_ll_txfifo_flush(void)
|
static inline void usb_serial_jtag_ll_txfifo_flush(void)
|
||||||
{
|
{
|
||||||
USB_SERIAL_JTAG.ep1_conf.wr_done=1;
|
USB_SERIAL_JTAG.ep1_conf.wr_done = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
+7
-4
@@ -31,7 +31,6 @@ typedef enum {
|
|||||||
USB_SERIAL_JTAG_INTR_EP1_ZERO_PAYLOAD = (1 << 10),
|
USB_SERIAL_JTAG_INTR_EP1_ZERO_PAYLOAD = (1 << 10),
|
||||||
} usb_serial_jtag_ll_intr_t;
|
} usb_serial_jtag_ll_intr_t;
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@@ -116,7 +115,9 @@ static inline int usb_serial_jtag_ll_read_rxfifo(uint8_t *buf, uint32_t rd_len)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (int)rd_len; i++) {
|
for (i = 0; i < (int)rd_len; i++) {
|
||||||
if (!USB_SERIAL_JTAG.ep1_conf.serial_out_ep_data_avail) break;
|
if (!USB_SERIAL_JTAG.ep1_conf.serial_out_ep_data_avail) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
buf[i] = USB_SERIAL_JTAG.ep1.rdwr_byte;
|
buf[i] = USB_SERIAL_JTAG.ep1.rdwr_byte;
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
@@ -135,7 +136,9 @@ static inline int usb_serial_jtag_ll_write_txfifo(const uint8_t *buf, uint32_t w
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (int)wr_len; i++) {
|
for (i = 0; i < (int)wr_len; i++) {
|
||||||
if (!USB_SERIAL_JTAG.ep1_conf.serial_in_ep_data_free) break;
|
if (!USB_SERIAL_JTAG.ep1_conf.serial_in_ep_data_free) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
USB_SERIAL_JTAG.ep1.rdwr_byte = buf[i];
|
USB_SERIAL_JTAG.ep1.rdwr_byte = buf[i];
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
@@ -178,7 +181,7 @@ static inline int usb_serial_jtag_ll_txfifo_writable(void)
|
|||||||
*/
|
*/
|
||||||
static inline void usb_serial_jtag_ll_txfifo_flush(void)
|
static inline void usb_serial_jtag_ll_txfifo_flush(void)
|
||||||
{
|
{
|
||||||
USB_SERIAL_JTAG.ep1_conf.wr_done=1;
|
USB_SERIAL_JTAG.ep1_conf.wr_done = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
+7
-6
@@ -31,7 +31,6 @@ typedef enum {
|
|||||||
USB_SERIAL_JTAG_INTR_EP1_ZERO_PAYLOAD = (1 << 10),
|
USB_SERIAL_JTAG_INTR_EP1_ZERO_PAYLOAD = (1 << 10),
|
||||||
} usb_serial_jtag_ll_intr_t;
|
} usb_serial_jtag_ll_intr_t;
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@@ -116,7 +115,9 @@ static inline int usb_serial_jtag_ll_read_rxfifo(uint8_t *buf, uint32_t rd_len)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (int)rd_len; i++) {
|
for (i = 0; i < (int)rd_len; i++) {
|
||||||
if (!USB_SERIAL_JTAG.serial_jtag_ep1_conf.serial_jtag_serial_out_ep_data_avail) break;
|
if (!USB_SERIAL_JTAG.serial_jtag_ep1_conf.serial_jtag_serial_out_ep_data_avail) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
buf[i] = USB_SERIAL_JTAG.serial_jtag_ep1.val;
|
buf[i] = USB_SERIAL_JTAG.serial_jtag_ep1.val;
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
@@ -135,7 +136,9 @@ static inline int usb_serial_jtag_ll_write_txfifo(const uint8_t *buf, uint32_t w
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (int)wr_len; i++) {
|
for (i = 0; i < (int)wr_len; i++) {
|
||||||
if (!USB_SERIAL_JTAG.serial_jtag_ep1_conf.serial_jtag_serial_in_ep_data_free) break;
|
if (!USB_SERIAL_JTAG.serial_jtag_ep1_conf.serial_jtag_serial_in_ep_data_free) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
USB_SERIAL_JTAG.serial_jtag_ep1.val = buf[i];
|
USB_SERIAL_JTAG.serial_jtag_ep1.val = buf[i];
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
@@ -178,7 +181,7 @@ static inline int usb_serial_jtag_ll_txfifo_writable(void)
|
|||||||
*/
|
*/
|
||||||
static inline void usb_serial_jtag_ll_txfifo_flush(void)
|
static inline void usb_serial_jtag_ll_txfifo_flush(void)
|
||||||
{
|
{
|
||||||
USB_SERIAL_JTAG.serial_jtag_ep1_conf.serial_jtag_wr_done=1;
|
USB_SERIAL_JTAG.serial_jtag_ep1_conf.serial_jtag_wr_done = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -328,8 +331,6 @@ FORCE_INLINE_ATTR bool usb_serial_jtag_ll_module_is_enabled(void)
|
|||||||
return (PCR.usb_device_conf.usb_device_clk_en && !PCR.usb_device_conf.usb_device_rst_en);
|
return (PCR.usb_device_conf.usb_device_clk_en && !PCR.usb_device_conf.usb_device_rst_en);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
+7
-6
@@ -31,7 +31,6 @@ typedef enum {
|
|||||||
USB_SERIAL_JTAG_INTR_EP1_ZERO_PAYLOAD = (1 << 10),
|
USB_SERIAL_JTAG_INTR_EP1_ZERO_PAYLOAD = (1 << 10),
|
||||||
} usb_serial_jtag_ll_intr_t;
|
} usb_serial_jtag_ll_intr_t;
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@@ -116,7 +115,9 @@ static inline int usb_serial_jtag_ll_read_rxfifo(uint8_t *buf, uint32_t rd_len)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (int)rd_len; i++) {
|
for (i = 0; i < (int)rd_len; i++) {
|
||||||
if (!USB_SERIAL_JTAG.serial_jtag_ep1_conf.serial_jtag_serial_out_ep_data_avail) break;
|
if (!USB_SERIAL_JTAG.serial_jtag_ep1_conf.serial_jtag_serial_out_ep_data_avail) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
buf[i] = USB_SERIAL_JTAG.serial_jtag_ep1.val;
|
buf[i] = USB_SERIAL_JTAG.serial_jtag_ep1.val;
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
@@ -135,7 +136,9 @@ static inline int usb_serial_jtag_ll_write_txfifo(const uint8_t *buf, uint32_t w
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (int)wr_len; i++) {
|
for (i = 0; i < (int)wr_len; i++) {
|
||||||
if (!USB_SERIAL_JTAG.serial_jtag_ep1_conf.serial_jtag_serial_in_ep_data_free) break;
|
if (!USB_SERIAL_JTAG.serial_jtag_ep1_conf.serial_jtag_serial_in_ep_data_free) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
USB_SERIAL_JTAG.serial_jtag_ep1.val = buf[i];
|
USB_SERIAL_JTAG.serial_jtag_ep1.val = buf[i];
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
@@ -178,7 +181,7 @@ static inline int usb_serial_jtag_ll_txfifo_writable(void)
|
|||||||
*/
|
*/
|
||||||
static inline void usb_serial_jtag_ll_txfifo_flush(void)
|
static inline void usb_serial_jtag_ll_txfifo_flush(void)
|
||||||
{
|
{
|
||||||
USB_SERIAL_JTAG.serial_jtag_ep1_conf.serial_jtag_wr_done=1;
|
USB_SERIAL_JTAG.serial_jtag_ep1_conf.serial_jtag_wr_done = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -328,8 +331,6 @@ FORCE_INLINE_ATTR bool usb_serial_jtag_ll_module_is_enabled(void)
|
|||||||
return (PCR.usb_device_conf.usb_device_clk_en && !PCR.usb_device_conf.usb_device_rst_en);
|
return (PCR.usb_device_conf.usb_device_clk_en && !PCR.usb_device_conf.usb_device_rst_en);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
+7
-3
@@ -119,7 +119,9 @@ static inline int usb_serial_jtag_ll_read_rxfifo(uint8_t *buf, uint32_t rd_len)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (int)rd_len; i++) {
|
for (i = 0; i < (int)rd_len; i++) {
|
||||||
if (!USB_SERIAL_JTAG.ep1_conf.serial_out_ep_data_avail) break;
|
if (!USB_SERIAL_JTAG.ep1_conf.serial_out_ep_data_avail) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
buf[i] = HAL_FORCE_READ_U32_REG_FIELD(USB_SERIAL_JTAG.ep1, rdwr_byte);
|
buf[i] = HAL_FORCE_READ_U32_REG_FIELD(USB_SERIAL_JTAG.ep1, rdwr_byte);
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
@@ -138,7 +140,9 @@ static inline int usb_serial_jtag_ll_write_txfifo(const uint8_t *buf, uint32_t w
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (int)wr_len; i++) {
|
for (i = 0; i < (int)wr_len; i++) {
|
||||||
if (!USB_SERIAL_JTAG.ep1_conf.serial_in_ep_data_free) break;
|
if (!USB_SERIAL_JTAG.ep1_conf.serial_in_ep_data_free) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
HAL_FORCE_MODIFY_U32_REG_FIELD(USB_SERIAL_JTAG.ep1, rdwr_byte, buf[i]);
|
HAL_FORCE_MODIFY_U32_REG_FIELD(USB_SERIAL_JTAG.ep1, rdwr_byte, buf[i]);
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
@@ -181,7 +185,7 @@ static inline int usb_serial_jtag_ll_txfifo_writable(void)
|
|||||||
*/
|
*/
|
||||||
static inline void usb_serial_jtag_ll_txfifo_flush(void)
|
static inline void usb_serial_jtag_ll_txfifo_flush(void)
|
||||||
{
|
{
|
||||||
USB_SERIAL_JTAG.ep1_conf.wr_done=1;
|
USB_SERIAL_JTAG.ep1_conf.wr_done = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
+7
-4
@@ -33,7 +33,6 @@ typedef enum {
|
|||||||
USB_SERIAL_JTAG_INTR_EP1_ZERO_PAYLOAD = (1 << 10),
|
USB_SERIAL_JTAG_INTR_EP1_ZERO_PAYLOAD = (1 << 10),
|
||||||
} usb_serial_jtag_intr_t;
|
} usb_serial_jtag_intr_t;
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@@ -118,7 +117,9 @@ static inline uint32_t usb_serial_jtag_ll_read_rxfifo(uint8_t *buf, uint32_t rd_
|
|||||||
{
|
{
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
for (i = 0; i < rd_len; i++) {
|
for (i = 0; i < rd_len; i++) {
|
||||||
if (!USB_SERIAL_JTAG.ep1_conf.serial_out_ep_data_avail) break;
|
if (!USB_SERIAL_JTAG.ep1_conf.serial_out_ep_data_avail) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
buf[i] = USB_SERIAL_JTAG.ep1.rdwr_byte;
|
buf[i] = USB_SERIAL_JTAG.ep1.rdwr_byte;
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
@@ -137,7 +138,9 @@ static inline uint32_t usb_serial_jtag_ll_write_txfifo(const uint8_t *buf, uint3
|
|||||||
{
|
{
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
for (i = 0; i < wr_len; i++) {
|
for (i = 0; i < wr_len; i++) {
|
||||||
if (!USB_SERIAL_JTAG.ep1_conf.serial_in_ep_data_free) break;
|
if (!USB_SERIAL_JTAG.ep1_conf.serial_in_ep_data_free) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
USB_SERIAL_JTAG.ep1.rdwr_byte = buf[i];
|
USB_SERIAL_JTAG.ep1.rdwr_byte = buf[i];
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
@@ -180,7 +183,7 @@ static inline int usb_serial_jtag_ll_txfifo_writable(void)
|
|||||||
*/
|
*/
|
||||||
static inline void usb_serial_jtag_ll_txfifo_flush(void)
|
static inline void usb_serial_jtag_ll_txfifo_flush(void)
|
||||||
{
|
{
|
||||||
USB_SERIAL_JTAG.ep1_conf.wr_done=1;
|
USB_SERIAL_JTAG.ep1_conf.wr_done = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "esp_etm.h"
|
#include "esp_etm.h"
|
||||||
#include "soc/gdma_channel.h"
|
|
||||||
#include "hal/gdma_types.h"
|
#include "hal/gdma_types.h"
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
|
|
||||||
@@ -87,7 +86,7 @@ typedef struct {
|
|||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
gdma_trigger_peripheral_t periph; /*!< Target peripheral which will trigger DMA operations */
|
gdma_trigger_peripheral_t periph; /*!< Target peripheral which will trigger DMA operations */
|
||||||
int instance_id; /*!< Peripheral instance ID. Supported IDs are listed in `soc/gdma_channel.h`, e.g. SOC_GDMA_TRIG_PERIPH_UHCI0 */
|
int instance_id; /*!< Peripheral instance ID. Supported IDs are listed in `hal/gdma_channel.h`, e.g. SOC_GDMA_TRIG_PERIPH_UHCI0 */
|
||||||
int bus_id; /*!< Which system bus should the DMA attached to */
|
int bus_id; /*!< Which system bus should the DMA attached to */
|
||||||
} gdma_trigger_t;
|
} gdma_trigger_t;
|
||||||
|
|
||||||
|
|||||||
@@ -234,10 +234,6 @@ elseif(NOT BOOTLOADER_BUILD)
|
|||||||
list(APPEND srcs "ds_hal.c")
|
list(APPEND srcs "ds_hal.c")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CONFIG_SOC_USB_SERIAL_JTAG_SUPPORTED)
|
|
||||||
list(APPEND srcs "usb_serial_jtag_hal.c")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(CONFIG_SOC_TOUCH_SENSOR_SUPPORTED)
|
if(CONFIG_SOC_TOUCH_SENSOR_SUPPORTED)
|
||||||
# Source files for the legacy touch hal driver
|
# Source files for the legacy touch hal driver
|
||||||
if(CONFIG_SOC_TOUCH_SENSOR_VERSION LESS 3)
|
if(CONFIG_SOC_TOUCH_SENSOR_VERSION LESS 3)
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
/*
|
|
||||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
+5
-1
@@ -1,11 +1,15 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if __has_include("hal/gdma_channel.h")
|
||||||
|
#include "hal/gdma_channel.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@@ -28,10 +28,6 @@
|
|||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#include "hal/spi_types.h"
|
#include "hal/spi_types.h"
|
||||||
#include "hal/dma_types.h"
|
|
||||||
#if SOC_GDMA_SUPPORTED
|
|
||||||
#include "soc/gdma_channel.h"
|
|
||||||
#endif
|
|
||||||
#if SOC_GPSPI_SUPPORTED
|
#if SOC_GPSPI_SUPPORTED
|
||||||
#include "hal/spi_ll.h"
|
#include "hal/spi_ll.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -42,12 +38,6 @@ extern "C" {
|
|||||||
|
|
||||||
#if SOC_GPSPI_SUPPORTED
|
#if SOC_GPSPI_SUPPORTED
|
||||||
|
|
||||||
#if SOC_GDMA_TRIG_PERIPH_SPI2_BUS == SOC_GDMA_BUS_AHB
|
|
||||||
typedef dma_descriptor_align4_t spi_dma_desc_t;
|
|
||||||
#else
|
|
||||||
typedef dma_descriptor_align8_t spi_dma_desc_t;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Input parameters to the ``spi_hal_cal_clock_conf`` to calculate the timing configuration
|
* Input parameters to the ``spi_hal_cal_clock_conf`` to calculate the timing configuration
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -27,9 +27,7 @@
|
|||||||
#include "esp_types.h"
|
#include "esp_types.h"
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#include "hal/dma_types.h"
|
#include "hal/dma_types.h"
|
||||||
#if SOC_GDMA_SUPPORTED
|
#include "hal/gdma_types.h"
|
||||||
#include "soc/gdma_channel.h"
|
|
||||||
#endif
|
|
||||||
#if SOC_GPSPI_SUPPORTED
|
#if SOC_GPSPI_SUPPORTED
|
||||||
#include "hal/spi_ll.h"
|
#include "hal/spi_ll.h"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -46,11 +46,9 @@
|
|||||||
#include "esp_types.h"
|
#include "esp_types.h"
|
||||||
#include "esp_err.h"
|
#include "esp_err.h"
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#if SOC_GDMA_SUPPORTED
|
|
||||||
#include "soc/gdma_channel.h"
|
|
||||||
#endif
|
|
||||||
#include "hal/spi_types.h"
|
#include "hal/spi_types.h"
|
||||||
#include "hal/dma_types.h"
|
#include "hal/dma_types.h"
|
||||||
|
#include "hal/gdma_types.h"
|
||||||
#if SOC_GPSPI_SUPPORTED
|
#if SOC_GPSPI_SUPPORTED
|
||||||
#include "hal/spi_ll.h"
|
#include "hal/spi_ll.h"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
|
|
||||||
#include "hal/gdma_ll.h"
|
#include "hal/gdma_ll.h"
|
||||||
#include "soc/gdma_channel.h"
|
#include "hal/gdma_types.h"
|
||||||
#if SOC_AHB_GDMA_VERSION == 2
|
#if SOC_AHB_GDMA_VERSION == 2
|
||||||
#include "soc/ahb_dma_struct.h"
|
#include "soc/ahb_dma_struct.h"
|
||||||
#elif SOC_AHB_GDMA_VERSION == 1
|
#elif SOC_AHB_GDMA_VERSION == 1
|
||||||
|
|||||||
@@ -10,8 +10,6 @@
|
|||||||
#include "mbedtls/aes.h"
|
#include "mbedtls/aes.h"
|
||||||
#include "esp_crypto_dma.h"
|
#include "esp_crypto_dma.h"
|
||||||
|
|
||||||
#include "hal/gdma_types.h"
|
|
||||||
#include "soc/gdma_channel.h"
|
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
|
|
||||||
#include "esp_tee_crypto_shared_gdma.h"
|
#include "esp_tee_crypto_shared_gdma.h"
|
||||||
|
|||||||
@@ -6,11 +6,11 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "hal/dma_types.h"
|
|
||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
|
#include "hal/dma_types.h"
|
||||||
|
#include "hal/gdma_types.h"
|
||||||
|
|
||||||
#if SOC_GDMA_SUPPORTED
|
#if SOC_GDMA_SUPPORTED
|
||||||
#include "soc/gdma_channel.h"
|
|
||||||
#include "hal/gdma_ll.h"
|
#include "hal/gdma_ll.h"
|
||||||
#endif /* SOC_GDMA_SUPPORTED */
|
#endif /* SOC_GDMA_SUPPORTED */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
/*
|
|
||||||
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
// ESP32 doesn't feature General DMA peripheral.
|
|
||||||
// We keep this file here only for consistency's sake.
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
/*
|
|
||||||
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
// ESP32-S2 doesn't feature General DMA peripheral.
|
|
||||||
// We keep this file here only for consistency's sake.
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
INPUT += \
|
INPUT += \
|
||||||
$(PROJECT_PATH)/components/esp_driver_bitscrambler/include/driver/bitscrambler.h \
|
$(PROJECT_PATH)/components/esp_driver_bitscrambler/include/driver/bitscrambler.h \
|
||||||
$(PROJECT_PATH)/components/esp_driver_bitscrambler/include/driver/bitscrambler_loopback.h \
|
$(PROJECT_PATH)/components/esp_driver_bitscrambler/include/driver/bitscrambler_loopback.h \
|
||||||
$(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/bitscrambler_peri_select.h \
|
$(PROJECT_PATH)/components/esp_hal_dma/esp32c5/include/hal/bitscrambler_peri_select.h \
|
||||||
$(PROJECT_PATH)/components/ulp/lp_core/include/lp_core_i2c.h \
|
$(PROJECT_PATH)/components/ulp/lp_core/include/lp_core_i2c.h \
|
||||||
$(PROJECT_PATH)/components/ulp/lp_core/include/lp_core_uart.h \
|
$(PROJECT_PATH)/components/ulp/lp_core/include/lp_core_uart.h \
|
||||||
$(PROJECT_PATH)/components/ulp/lp_core/include/lp_core_etm.h \
|
$(PROJECT_PATH)/components/ulp/lp_core/include/lp_core_etm.h \
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ INPUT += \
|
|||||||
$(PROJECT_PATH)/components/esp_driver_touch_sens/include/driver/touch_sens.h \
|
$(PROJECT_PATH)/components/esp_driver_touch_sens/include/driver/touch_sens.h \
|
||||||
$(PROJECT_PATH)/components/esp_driver_touch_sens/include/driver/touch_sens_types.h \
|
$(PROJECT_PATH)/components/esp_driver_touch_sens/include/driver/touch_sens_types.h \
|
||||||
$(PROJECT_PATH)/components/esp_hal_cam/include/hal/cam_ctlr_types.h \
|
$(PROJECT_PATH)/components/esp_hal_cam/include/hal/cam_ctlr_types.h \
|
||||||
|
$(PROJECT_PATH)/components/esp_hal_dma/esp32p4/include/hal/bitscrambler_peri_select.h \
|
||||||
$(PROJECT_PATH)/components/esp_lcd/dsi/include/esp_lcd_mipi_dsi.h \
|
$(PROJECT_PATH)/components/esp_lcd/dsi/include/esp_lcd_mipi_dsi.h \
|
||||||
$(PROJECT_PATH)/components/esp_lcd/rgb/include/esp_lcd_panel_rgb.h \
|
$(PROJECT_PATH)/components/esp_lcd/rgb/include/esp_lcd_panel_rgb.h \
|
||||||
$(PROJECT_PATH)/components/hal/include/hal/isp_types.h \
|
$(PROJECT_PATH)/components/hal/include/hal/isp_types.h \
|
||||||
@@ -40,7 +41,6 @@ INPUT += \
|
|||||||
$(PROJECT_PATH)/components/hal/include/hal/ppa_types.h \
|
$(PROJECT_PATH)/components/hal/include/hal/ppa_types.h \
|
||||||
$(PROJECT_PATH)/components/sdmmc/include/sd_pwr_ctrl.h \
|
$(PROJECT_PATH)/components/sdmmc/include/sd_pwr_ctrl.h \
|
||||||
$(PROJECT_PATH)/components/sdmmc/include/sd_pwr_ctrl_by_on_chip_ldo.h \
|
$(PROJECT_PATH)/components/sdmmc/include/sd_pwr_ctrl_by_on_chip_ldo.h \
|
||||||
$(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/bitscrambler_peri_select.h \
|
|
||||||
$(PROJECT_PATH)/components/ulp/lp_core/include/lp_core_etm.h \
|
$(PROJECT_PATH)/components/ulp/lp_core/include/lp_core_etm.h \
|
||||||
$(PROJECT_PATH)/components/ulp/lp_core/include/lp_core_i2c.h \
|
$(PROJECT_PATH)/components/ulp/lp_core/include/lp_core_i2c.h \
|
||||||
$(PROJECT_PATH)/components/ulp/lp_core/include/lp_core_spi.h \
|
$(PROJECT_PATH)/components/ulp/lp_core/include/lp_core_spi.h \
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ allowed_soc_headers = (
|
|||||||
'soc/reg_base.h',
|
'soc/reg_base.h',
|
||||||
'soc/clk_tree_defs.h',
|
'soc/clk_tree_defs.h',
|
||||||
'soc/uart_channel.h',
|
'soc/uart_channel.h',
|
||||||
'soc/bitscrambler_peri_select.h',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
include_header_pattern = re.compile(r'[\s]*#[\s]*include ["<](.*)[">].*')
|
include_header_pattern = re.compile(r'[\s]*#[\s]*include ["<](.*)[">].*')
|
||||||
@@ -33,7 +32,7 @@ class PublicAPIVisits:
|
|||||||
self._idf_path = idf_path
|
self._idf_path = idf_path
|
||||||
|
|
||||||
def __iter__(self) -> typing.Generator:
|
def __iter__(self) -> typing.Generator:
|
||||||
with open(self.doxyfile_path, 'r', encoding='utf8') as f:
|
with open(self.doxyfile_path, encoding='utf8') as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
if line.startswith('$(PROJECT_PATH)'):
|
if line.startswith('$(PROJECT_PATH)'):
|
||||||
@@ -48,10 +47,10 @@ def check_soc_not_in(
|
|||||||
idf_path: str,
|
idf_path: str,
|
||||||
target: str,
|
target: str,
|
||||||
doxyfile_path: str,
|
doxyfile_path: str,
|
||||||
violation_dict: typing.Dict[str, set],
|
violation_dict: dict[str, set],
|
||||||
) -> None:
|
) -> None:
|
||||||
for file_path in PublicAPIVisits(os.path.join(idf_path, doxyfile_path), idf_path, target):
|
for file_path in PublicAPIVisits(os.path.join(idf_path, doxyfile_path), idf_path, target):
|
||||||
with open(file_path, 'r', encoding='utf8') as f:
|
with open(file_path, encoding='utf8') as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
match_data = re.match(include_header_pattern, line)
|
match_data = re.match(include_header_pattern, line)
|
||||||
if match_data:
|
if match_data:
|
||||||
@@ -82,7 +81,7 @@ def main() -> None:
|
|||||||
print('No targets found', file=sys.stderr)
|
print('No targets found', file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
soc_violation_dict: typing.Dict[str, set] = {}
|
soc_violation_dict: dict[str, set] = {}
|
||||||
for target in targets:
|
for target in targets:
|
||||||
check_soc_not_in(
|
check_soc_not_in(
|
||||||
idf_path,
|
idf_path,
|
||||||
|
|||||||
Reference in New Issue
Block a user