From 4034446cc7eff5ff7866bf06375b3a092f476037 Mon Sep 17 00:00:00 2001 From: "C.S.M" Date: Thu, 25 Dec 2025 16:29:38 +0800 Subject: [PATCH] refactor(hal): Cleanup some missing hal files --- .../include/hal/dma2d_types.h | 0 .../include/hal/dma_types.h | 0 .../include/hal/gdma_types.h | 0 .../include/hal/eth_types.h | 0 .../include/hal/glitch_filter_types.h | 0 .../include/hal/i2s_hal.h | 1 - .../include/hal/lp_i2s_hal.h | 0 .../include/hal/jpeg_defs.h | 2 -- .../include/hal/mcpwm_types.h | 0 .../include/hal/psram_types.h | 0 .../include/hal/usb_serial_jtag_types.h | 0 .../ldo/include/esp_ldo_regulator.h | 1 - components/hal/include/hal/ldo_types.h | 28 ------------------- docs/doxygen/Doxyfile | 4 +-- docs/en/api-reference/peripherals/mcpwm.rst | 2 +- .../zh_CN/api-reference/peripherals/mcpwm.rst | 2 +- 16 files changed, 4 insertions(+), 36 deletions(-) rename components/{hal => esp_hal_dma}/include/hal/dma2d_types.h (100%) rename components/{hal => esp_hal_dma}/include/hal/dma_types.h (100%) rename components/{hal => esp_hal_dma}/include/hal/gdma_types.h (100%) rename components/{hal => esp_hal_emac}/include/hal/eth_types.h (100%) rename components/{hal => esp_hal_gpio}/include/hal/glitch_filter_types.h (100%) rename components/{hal => esp_hal_i2s}/include/hal/i2s_hal.h (99%) rename components/{hal => esp_hal_i2s}/include/hal/lp_i2s_hal.h (100%) rename components/{hal => esp_hal_jpeg}/include/hal/jpeg_defs.h (99%) rename components/{hal => esp_hal_mcpwm}/include/hal/mcpwm_types.h (100%) rename components/{hal => esp_hal_mspi}/include/hal/psram_types.h (100%) rename components/{hal => esp_hal_usb}/include/hal/usb_serial_jtag_types.h (100%) delete mode 100644 components/hal/include/hal/ldo_types.h diff --git a/components/hal/include/hal/dma2d_types.h b/components/esp_hal_dma/include/hal/dma2d_types.h similarity index 100% rename from components/hal/include/hal/dma2d_types.h rename to components/esp_hal_dma/include/hal/dma2d_types.h diff --git a/components/hal/include/hal/dma_types.h b/components/esp_hal_dma/include/hal/dma_types.h similarity index 100% rename from components/hal/include/hal/dma_types.h rename to components/esp_hal_dma/include/hal/dma_types.h diff --git a/components/hal/include/hal/gdma_types.h b/components/esp_hal_dma/include/hal/gdma_types.h similarity index 100% rename from components/hal/include/hal/gdma_types.h rename to components/esp_hal_dma/include/hal/gdma_types.h diff --git a/components/hal/include/hal/eth_types.h b/components/esp_hal_emac/include/hal/eth_types.h similarity index 100% rename from components/hal/include/hal/eth_types.h rename to components/esp_hal_emac/include/hal/eth_types.h diff --git a/components/hal/include/hal/glitch_filter_types.h b/components/esp_hal_gpio/include/hal/glitch_filter_types.h similarity index 100% rename from components/hal/include/hal/glitch_filter_types.h rename to components/esp_hal_gpio/include/hal/glitch_filter_types.h diff --git a/components/hal/include/hal/i2s_hal.h b/components/esp_hal_i2s/include/hal/i2s_hal.h similarity index 99% rename from components/hal/include/hal/i2s_hal.h rename to components/esp_hal_i2s/include/hal/i2s_hal.h index fb4b2b9313..ed9b4581b9 100644 --- a/components/hal/include/hal/i2s_hal.h +++ b/components/esp_hal_i2s/include/hal/i2s_hal.h @@ -371,7 +371,6 @@ void i2s_hal_tdm_enable_rx_channel(i2s_hal_context_t *hal); */ #define i2s_hal_rx_reset_fifo(hal) i2s_ll_rx_reset_fifo((hal)->dev) - #if !SOC_GDMA_SUPPORTED /** * @brief Enable I2S TX DMA diff --git a/components/hal/include/hal/lp_i2s_hal.h b/components/esp_hal_i2s/include/hal/lp_i2s_hal.h similarity index 100% rename from components/hal/include/hal/lp_i2s_hal.h rename to components/esp_hal_i2s/include/hal/lp_i2s_hal.h diff --git a/components/hal/include/hal/jpeg_defs.h b/components/esp_hal_jpeg/include/hal/jpeg_defs.h similarity index 99% rename from components/hal/include/hal/jpeg_defs.h rename to components/esp_hal_jpeg/include/hal/jpeg_defs.h index 1518edceb4..e17f5f8a56 100644 --- a/components/hal/include/hal/jpeg_defs.h +++ b/components/esp_hal_jpeg/include/hal/jpeg_defs.h @@ -13,7 +13,6 @@ extern "C" { #endif - /* * @brief Enum to define JPEG marker codes */ @@ -73,7 +72,6 @@ typedef enum { JPEG_M_INV = 0xFFFF, ///< Invalid marker } __attribute__((packed)) jpeg_marker_code_t; - #ifdef __cplusplus } #endif diff --git a/components/hal/include/hal/mcpwm_types.h b/components/esp_hal_mcpwm/include/hal/mcpwm_types.h similarity index 100% rename from components/hal/include/hal/mcpwm_types.h rename to components/esp_hal_mcpwm/include/hal/mcpwm_types.h diff --git a/components/hal/include/hal/psram_types.h b/components/esp_hal_mspi/include/hal/psram_types.h similarity index 100% rename from components/hal/include/hal/psram_types.h rename to components/esp_hal_mspi/include/hal/psram_types.h diff --git a/components/hal/include/hal/usb_serial_jtag_types.h b/components/esp_hal_usb/include/hal/usb_serial_jtag_types.h similarity index 100% rename from components/hal/include/hal/usb_serial_jtag_types.h rename to components/esp_hal_usb/include/hal/usb_serial_jtag_types.h diff --git a/components/esp_hw_support/ldo/include/esp_ldo_regulator.h b/components/esp_hw_support/ldo/include/esp_ldo_regulator.h index 8db67237ca..67c78727d5 100644 --- a/components/esp_hw_support/ldo/include/esp_ldo_regulator.h +++ b/components/esp_hw_support/ldo/include/esp_ldo_regulator.h @@ -9,7 +9,6 @@ #include #include #include "esp_err.h" -#include "hal/ldo_types.h" #ifdef __cplusplus extern "C" { diff --git a/components/hal/include/hal/ldo_types.h b/components/hal/include/hal/ldo_types.h deleted file mode 100644 index 600e2c4366..0000000000 --- a/components/hal/include/hal/ldo_types.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020-2024 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ -#pragma once - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief LDO Unit - * - * @note See datasheet to know LDO, alias includes but not least to `VFB/VOn` - */ -typedef enum { - LDO_UNIT_1 = 1, ///< LDO 1 - LDO_UNIT_2, ///< LDO 2 - LDO_UNIT_3, ///< LDO 3 - LDO_UNIT_4, ///< LDO 4 -} ldo_unit_t; - -#ifdef __cplusplus -} -#endif diff --git a/docs/doxygen/Doxyfile b/docs/doxygen/Doxyfile index 9e88d60cca..abd87c9529 100644 --- a/docs/doxygen/Doxyfile +++ b/docs/doxygen/Doxyfile @@ -166,6 +166,7 @@ INPUT = \ $(PROJECT_PATH)/components/esp_hal_ana_conv/include/hal/adc_types.h \ $(PROJECT_PATH)/components/esp_hal_ana_conv/include/hal/dac_types.h \ $(PROJECT_PATH)/components/esp_hal_ana_conv/include/hal/temperature_sensor_types.h \ + $(PROJECT_PATH)/components/esp_hal_emac/include/hal/eth_types.h \ $(PROJECT_PATH)/components/esp_hal_gpio/include/hal/gpio_types.h \ $(PROJECT_PATH)/components/esp_hal_gpio/include/hal/rtc_io_types.h \ $(PROJECT_PATH)/components/esp_hal_gpio/include/hal/sdm_types.h \ @@ -177,6 +178,7 @@ INPUT = \ $(PROJECT_PATH)/components/esp_hal_lcd/include/hal/lcd_types.h \ $(PROJECT_PATH)/components/esp_hal_ledc/include/hal/ledc_types.h \ $(PROJECT_PATH)/components/esp_hal_parlio/include/hal/parlio_types.h \ + $(PROJECT_PATH)/components/esp_hal_mcpwm/include/hal/mcpwm_types.h \ $(PROJECT_PATH)/components/esp_hal_mspi/include/hal/esp_flash_err.h \ $(PROJECT_PATH)/components/esp_hal_mspi/include/hal/spi_flash_types.h \ $(PROJECT_PATH)/components/esp_hal_pcnt/include/hal/pcnt_types.h \ @@ -267,11 +269,9 @@ INPUT = \ $(PROJECT_PATH)/components/freertos/FreeRTOS-Kernel/include/freertos/task.h \ $(PROJECT_PATH)/components/freertos/FreeRTOS-Kernel/include/freertos/timers.h \ $(PROJECT_PATH)/components/hal/include/hal/color_types.h \ - $(PROJECT_PATH)/components/hal/include/hal/mcpwm_types.h \ $(PROJECT_PATH)/components/hal/include/hal/sdio_slave_types.h \ $(PROJECT_PATH)/components/hal/include/hal/uart_types.h \ $(PROJECT_PATH)/components/hal/include/hal/efuse_hal.h \ - $(PROJECT_PATH)/components/hal/include/hal/eth_types.h \ $(PROJECT_PATH)/components/hal/include/hal/lp_core_types.h \ $(PROJECT_PATH)/components/hal/include/hal/sd_types.h \ $(PROJECT_PATH)/components/hal/include/hal/uhci_types.h \ diff --git a/docs/en/api-reference/peripherals/mcpwm.rst b/docs/en/api-reference/peripherals/mcpwm.rst index e7ed78f6de..98e4971148 100644 --- a/docs/en/api-reference/peripherals/mcpwm.rst +++ b/docs/en/api-reference/peripherals/mcpwm.rst @@ -1065,7 +1065,7 @@ API Reference .. include-build-file:: inc/mcpwm_cap.inc .. include-build-file:: inc/mcpwm_etm.inc .. include-build-file:: inc/components/esp_driver_mcpwm/include/driver/mcpwm_types.inc -.. include-build-file:: inc/components/hal/include/hal/mcpwm_types.inc +.. include-build-file:: inc/components/esp_hal_mcpwm/include/hal/mcpwm_types.inc .. [1] diff --git a/docs/zh_CN/api-reference/peripherals/mcpwm.rst b/docs/zh_CN/api-reference/peripherals/mcpwm.rst index 7d419f1dc5..a45a64eacc 100644 --- a/docs/zh_CN/api-reference/peripherals/mcpwm.rst +++ b/docs/zh_CN/api-reference/peripherals/mcpwm.rst @@ -1065,7 +1065,7 @@ API 参考 .. include-build-file:: inc/mcpwm_cap.inc .. include-build-file:: inc/mcpwm_etm.inc .. include-build-file:: inc/components/esp_driver_mcpwm/include/driver/mcpwm_types.inc -.. include-build-file:: inc/components/hal/include/hal/mcpwm_types.inc +.. include-build-file:: inc/components/esp_hal_mcpwm/include/hal/mcpwm_types.inc .. [1]