diff --git a/components/esp_driver_bitscrambler/CMakeLists.txt b/components/esp_driver_bitscrambler/CMakeLists.txt index 91742d8e42..2be1f9db05 100644 --- a/components/esp_driver_bitscrambler/CMakeLists.txt +++ b/components/esp_driver_bitscrambler/CMakeLists.txt @@ -10,6 +10,7 @@ if(CONFIG_SOC_BITSCRAMBLER_SUPPORTED) endif() idf_component_register(SRCS ${srcs} + REQUIRES "esp_hal_dma" PRIV_REQUIRES "esp_mm" INCLUDE_DIRS "include" LDFRAGMENTS "linker.lf") diff --git a/components/esp_driver_bitscrambler/include/driver/bitscrambler.h b/components/esp_driver_bitscrambler/include/driver/bitscrambler.h index 3f1a5d505b..47e7099c95 100644 --- a/components/esp_driver_bitscrambler/include/driver/bitscrambler.h +++ b/components/esp_driver_bitscrambler/include/driver/bitscrambler.h @@ -9,9 +9,6 @@ #include "esp_err.h" #include "soc/soc_caps.h" #include "hal/bitscrambler_types.h" -#if SOC_BITSCRAMBLER_SUPPORTED -#include "soc/bitscrambler_peri_select.h" -#endif #ifdef __cplusplus extern "C" { diff --git a/components/esp_driver_bitscrambler/src/bitscrambler_esp32c5.c b/components/esp_driver_bitscrambler/src/bitscrambler_esp32c5.c index 741fc61af2..26d98d4075 100644 --- a/components/esp_driver_bitscrambler/src/bitscrambler_esp32c5.c +++ b/components/esp_driver_bitscrambler/src/bitscrambler_esp32c5.c @@ -3,11 +3,10 @@ * * SPDX-License-Identifier: Apache-2.0 */ -#include "soc/gdma_channel.h" +#include "hal/gdma_channel.h" #include "bitscrambler_soc_specific.h" -// Note: these are indexed by the values of the SOC_BITSCRAMBLER_ATTACH_ defines -// in soc/bitscrambler_peri_select.h +// Note: these are indexed by the values of the SOC_BITSCRAMBLER_ATTACH_ defines in bitscrambler_peri_select.h // This map is used by the bitscrambler loopback driver only. const bitscrambler_periph_desc_t g_bitscrambler_periph_desc[] = { diff --git a/components/esp_driver_bitscrambler/src/bitscrambler_esp32p4.c b/components/esp_driver_bitscrambler/src/bitscrambler_esp32p4.c index 156c44ca28..fcf1f69c20 100644 --- a/components/esp_driver_bitscrambler/src/bitscrambler_esp32p4.c +++ b/components/esp_driver_bitscrambler/src/bitscrambler_esp32p4.c @@ -3,11 +3,10 @@ * * SPDX-License-Identifier: Apache-2.0 */ -#include "soc/gdma_channel.h" +#include "hal/gdma_channel.h" #include "bitscrambler_soc_specific.h" -// Note: these are indexed by the values of the SOC_BITSCRAMBLER_ATTACH_ defines -// in soc/bitscrambler_peri_select.h +// Note: these are indexed by the values of the SOC_BITSCRAMBLER_ATTACH_ defines in bitscrambler_peri_select.h // This map is used by the bitscrambler loopback driver only. const bitscrambler_periph_desc_t g_bitscrambler_periph_desc[] = { diff --git a/components/esp_driver_bitscrambler/src/bitscrambler_soc_specific.h b/components/esp_driver_bitscrambler/src/bitscrambler_soc_specific.h index 19261fc323..fb8b13973f 100644 --- a/components/esp_driver_bitscrambler/src/bitscrambler_soc_specific.h +++ b/components/esp_driver_bitscrambler/src/bitscrambler_soc_specific.h @@ -6,7 +6,7 @@ #pragma once #include "esp_private/gdma.h" -#include "soc/bitscrambler_peri_select.h" +#include "hal/bitscrambler_peri_select.h" #ifdef __cplusplus extern "C" { diff --git a/components/esp_driver_bitscrambler/test_apps/.build-test-rules.yml b/components/esp_driver_bitscrambler/test_apps/.build-test-rules.yml index 7850619f53..f204d48c98 100644 --- a/components/esp_driver_bitscrambler/test_apps/.build-test-rules.yml +++ b/components/esp_driver_bitscrambler/test_apps/.build-test-rules.yml @@ -3,3 +3,4 @@ components/esp_driver_bitscrambler/test_apps/bitscrambler: - if: SOC_BITSCRAMBLER_SUPPORTED != 1 depends_components: - esp_driver_bitscrambler + - esp_hal_dma diff --git a/components/esp_driver_parlio/src/parlio_priv.h b/components/esp_driver_parlio/src/parlio_priv.h index 7d4c1b11d3..be2147f6bd 100644 --- a/components/esp_driver_parlio/src/parlio_priv.h +++ b/components/esp_driver_parlio/src/parlio_priv.h @@ -27,7 +27,6 @@ #include "freertos/queue.h" #include "freertos/idf_additions.h" #include "soc/soc_caps.h" -#include "soc/gdma_channel.h" #include "hal/parlio_periph.h" #include "hal/parlio_types.h" #include "hal/parlio_hal.h" diff --git a/components/esp_driver_rmt/src/rmt_private.h b/components/esp_driver_rmt/src/rmt_private.h index 40453b01bc..9d442306fb 100644 --- a/components/esp_driver_rmt/src/rmt_private.h +++ b/components/esp_driver_rmt/src/rmt_private.h @@ -26,7 +26,6 @@ #include "esp_check.h" #include "esp_err.h" #include "soc/soc_caps.h" -#include "soc/gdma_channel.h" #include "soc/rmt_periph.h" #include "hal/rmt_types.h" #include "hal/rmt_hal.h" diff --git a/components/soc/esp32c2/include/soc/gdma_channel.h b/components/esp_hal_dma/esp32c2/include/hal/gdma_channel.h similarity index 100% rename from components/soc/esp32c2/include/soc/gdma_channel.h rename to components/esp_hal_dma/esp32c2/include/hal/gdma_channel.h diff --git a/components/soc/esp32c3/include/soc/gdma_channel.h b/components/esp_hal_dma/esp32c3/include/hal/gdma_channel.h similarity index 100% rename from components/soc/esp32c3/include/soc/gdma_channel.h rename to components/esp_hal_dma/esp32c3/include/hal/gdma_channel.h diff --git a/components/hal/esp32c5/include/hal/bitscrambler_ll.h b/components/esp_hal_dma/esp32c5/include/hal/bitscrambler_ll.h similarity index 99% rename from components/hal/esp32c5/include/hal/bitscrambler_ll.h rename to components/esp_hal_dma/esp32c5/include/hal/bitscrambler_ll.h index 7c8706a776..340133a209 100644 --- a/components/hal/esp32c5/include/hal/bitscrambler_ll.h +++ b/components/esp_hal_dma/esp32c5/include/hal/bitscrambler_ll.h @@ -4,7 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ - #pragma once #include @@ -29,7 +28,7 @@ extern "C" { * * @param hw BitScrambler hardware instance address. * @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) { @@ -62,7 +61,6 @@ static inline void bitscrambler_ll_disable(bitscrambler_dev_t *hw, bitscrambler_ hw->ctrl[dir].ena = 0; } - /** * @brief Write a word to the instruction memory * diff --git a/components/soc/esp32c5/include/soc/bitscrambler_peri_select.h b/components/esp_hal_dma/esp32c5/include/hal/bitscrambler_peri_select.h similarity index 100% rename from components/soc/esp32c5/include/soc/bitscrambler_peri_select.h rename to components/esp_hal_dma/esp32c5/include/hal/bitscrambler_peri_select.h diff --git a/components/soc/esp32c5/include/soc/gdma_channel.h b/components/esp_hal_dma/esp32c5/include/hal/gdma_channel.h similarity index 100% rename from components/soc/esp32c5/include/soc/gdma_channel.h rename to components/esp_hal_dma/esp32c5/include/hal/gdma_channel.h diff --git a/components/soc/esp32c6/include/soc/gdma_channel.h b/components/esp_hal_dma/esp32c6/include/hal/gdma_channel.h similarity index 100% rename from components/soc/esp32c6/include/soc/gdma_channel.h rename to components/esp_hal_dma/esp32c6/include/hal/gdma_channel.h diff --git a/components/soc/esp32c61/include/soc/gdma_channel.h b/components/esp_hal_dma/esp32c61/include/hal/gdma_channel.h similarity index 100% rename from components/soc/esp32c61/include/soc/gdma_channel.h rename to components/esp_hal_dma/esp32c61/include/hal/gdma_channel.h diff --git a/components/soc/esp32h2/include/soc/gdma_channel.h b/components/esp_hal_dma/esp32h2/include/hal/gdma_channel.h similarity index 100% rename from components/soc/esp32h2/include/soc/gdma_channel.h rename to components/esp_hal_dma/esp32h2/include/hal/gdma_channel.h diff --git a/components/soc/esp32h21/include/soc/gdma_channel.h b/components/esp_hal_dma/esp32h21/include/hal/gdma_channel.h similarity index 100% rename from components/soc/esp32h21/include/soc/gdma_channel.h rename to components/esp_hal_dma/esp32h21/include/hal/gdma_channel.h diff --git a/components/soc/esp32h4/include/soc/gdma_channel.h b/components/esp_hal_dma/esp32h4/include/hal/gdma_channel.h similarity index 100% rename from components/soc/esp32h4/include/soc/gdma_channel.h rename to components/esp_hal_dma/esp32h4/include/hal/gdma_channel.h diff --git a/components/hal/esp32p4/include/hal/bitscrambler_ll.h b/components/esp_hal_dma/esp32p4/include/hal/bitscrambler_ll.h similarity index 99% rename from components/hal/esp32p4/include/hal/bitscrambler_ll.h rename to components/esp_hal_dma/esp32p4/include/hal/bitscrambler_ll.h index ae0cd2fb99..aae096d604 100644 --- a/components/hal/esp32p4/include/hal/bitscrambler_ll.h +++ b/components/esp_hal_dma/esp32p4/include/hal/bitscrambler_ll.h @@ -4,7 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ - #pragma once #include @@ -29,7 +28,7 @@ extern "C" { * * @param hw BitScrambler hardware instance address. * @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) { @@ -62,7 +61,6 @@ static inline void bitscrambler_ll_disable(bitscrambler_dev_t *hw, bitscrambler_ hw->ctrl[dir].ena = 0; } - /** * @brief Write a word to the instruction memory * diff --git a/components/soc/esp32p4/include/soc/bitscrambler_peri_select.h b/components/esp_hal_dma/esp32p4/include/hal/bitscrambler_peri_select.h similarity index 100% rename from components/soc/esp32p4/include/soc/bitscrambler_peri_select.h rename to components/esp_hal_dma/esp32p4/include/hal/bitscrambler_peri_select.h diff --git a/components/soc/esp32p4/include/soc/gdma_channel.h b/components/esp_hal_dma/esp32p4/include/hal/gdma_channel.h similarity index 100% rename from components/soc/esp32p4/include/soc/gdma_channel.h rename to components/esp_hal_dma/esp32p4/include/hal/gdma_channel.h diff --git a/components/soc/esp32s3/include/soc/gdma_channel.h b/components/esp_hal_dma/esp32s3/include/hal/gdma_channel.h similarity index 100% rename from components/soc/esp32s3/include/soc/gdma_channel.h rename to components/esp_hal_dma/esp32s3/include/hal/gdma_channel.h diff --git a/components/hal/include/hal/bitscrambler_types.h b/components/esp_hal_dma/include/hal/bitscrambler_types.h similarity index 96% rename from components/hal/include/hal/bitscrambler_types.h rename to components/esp_hal_dma/include/hal/bitscrambler_types.h index daf9f348c2..5943d19a7a 100644 --- a/components/hal/include/hal/bitscrambler_types.h +++ b/components/esp_hal_dma/include/hal/bitscrambler_types.h @@ -6,6 +6,10 @@ #pragma once +#if __has_include("hal/bitscrambler_peri_select.h") +#include "hal/bitscrambler_peri_select.h" +#endif + #ifdef __cplusplus extern "C" { #endif @@ -27,7 +31,6 @@ typedef enum { BITSCRAMBLER_LUT_WIDTH_32BIT = 2, /*!< 32-bit LUT */ } bitscrambler_lut_width_t; - /** * @brief EOF signal generating mode of bitscrambler */ diff --git a/components/esp_hw_support/dma/include/esp_private/gdma.h b/components/esp_hw_support/dma/include/esp_private/gdma.h index 289b8e093d..a2bc904859 100644 --- a/components/esp_hw_support/dma/include/esp_private/gdma.h +++ b/components/esp_hw_support/dma/include/esp_private/gdma.h @@ -8,7 +8,6 @@ #include #include "esp_etm.h" -#include "soc/gdma_channel.h" #include "hal/gdma_types.h" #include "esp_err.h" @@ -87,7 +86,7 @@ typedef struct { */ typedef struct { 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 */ } gdma_trigger_t; diff --git a/components/hal/include/hal/bitscrambler_hal.h b/components/hal/include/hal/bitscrambler_hal.h deleted file mode 100644 index d0459ee550..0000000000 --- a/components/hal/include/hal/bitscrambler_hal.h +++ /dev/null @@ -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 diff --git a/components/esp_hal_dma/include/hal/gdma_types.h b/components/hal/include/hal/gdma_types.h similarity index 93% rename from components/esp_hal_dma/include/hal/gdma_types.h rename to components/hal/include/hal/gdma_types.h index 9ad63adee5..c8fb8bb871 100644 --- a/components/esp_hal_dma/include/hal/gdma_types.h +++ b/components/hal/include/hal/gdma_types.h @@ -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 */ #pragma once +#if __has_include("hal/gdma_channel.h") +#include "hal/gdma_channel.h" +#endif + #ifdef __cplusplus extern "C" { #endif diff --git a/components/hal/include/hal/spi_hal.h b/components/hal/include/hal/spi_hal.h index c9d2e136e8..f9bf7a4765 100644 --- a/components/hal/include/hal/spi_hal.h +++ b/components/hal/include/hal/spi_hal.h @@ -28,10 +28,6 @@ #include "esp_err.h" #include "soc/soc_caps.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 #include "hal/spi_ll.h" #endif @@ -42,12 +38,6 @@ extern "C" { #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 */ diff --git a/components/hal/include/hal/spi_slave_hal.h b/components/hal/include/hal/spi_slave_hal.h index 563e2a704c..12e3c0a28d 100644 --- a/components/hal/include/hal/spi_slave_hal.h +++ b/components/hal/include/hal/spi_slave_hal.h @@ -27,9 +27,7 @@ #include "esp_types.h" #include "soc/soc_caps.h" #include "hal/dma_types.h" -#if SOC_GDMA_SUPPORTED -#include "soc/gdma_channel.h" -#endif +#include "hal/gdma_types.h" #if SOC_GPSPI_SUPPORTED #include "hal/spi_ll.h" #endif diff --git a/components/hal/include/hal/spi_slave_hd_hal.h b/components/hal/include/hal/spi_slave_hd_hal.h index 605c3d1f33..829272afd3 100644 --- a/components/hal/include/hal/spi_slave_hd_hal.h +++ b/components/hal/include/hal/spi_slave_hd_hal.h @@ -46,11 +46,9 @@ #include "esp_types.h" #include "esp_err.h" #include "soc/soc_caps.h" -#if SOC_GDMA_SUPPORTED -#include "soc/gdma_channel.h" -#endif #include "hal/spi_types.h" #include "hal/dma_types.h" +#include "hal/gdma_types.h" #if SOC_GPSPI_SUPPORTED #include "hal/spi_ll.h" #endif diff --git a/components/hal/test_apps/tee/components/pms_and_cpu_intr/src/common/test_setup_utils.c b/components/hal/test_apps/tee/components/pms_and_cpu_intr/src/common/test_setup_utils.c index 189f9c5db2..8b54dfeb0d 100644 --- a/components/hal/test_apps/tee/components/pms_and_cpu_intr/src/common/test_setup_utils.c +++ b/components/hal/test_apps/tee/components/pms_and_cpu_intr/src/common/test_setup_utils.c @@ -11,7 +11,7 @@ #include "soc/soc_caps.h" #include "hal/gdma_ll.h" -#include "soc/gdma_channel.h" +#include "hal/gdma_types.h" #if SOC_AHB_GDMA_VERSION == 2 #include "soc/ahb_dma_struct.h" #elif SOC_AHB_GDMA_VERSION == 1 diff --git a/components/mbedtls/esp_tee/esp_tee_crypto_shared_gdma.c b/components/mbedtls/esp_tee/esp_tee_crypto_shared_gdma.c index 7b89a83c03..16ed38ba25 100644 --- a/components/mbedtls/esp_tee/esp_tee_crypto_shared_gdma.c +++ b/components/mbedtls/esp_tee/esp_tee_crypto_shared_gdma.c @@ -10,8 +10,6 @@ #include "mbedtls/aes.h" #include "esp_crypto_dma.h" -#include "hal/gdma_types.h" -#include "soc/gdma_channel.h" #include "soc/soc_caps.h" #include "esp_tee_crypto_shared_gdma.h" diff --git a/components/mbedtls/port/include/esp_crypto_dma.h b/components/mbedtls/port/include/esp_crypto_dma.h index f273cbd31a..da96ede8af 100644 --- a/components/mbedtls/port/include/esp_crypto_dma.h +++ b/components/mbedtls/port/include/esp_crypto_dma.h @@ -6,11 +6,11 @@ #pragma once -#include "hal/dma_types.h" #include "soc/soc_caps.h" +#include "hal/dma_types.h" +#include "hal/gdma_types.h" #if SOC_GDMA_SUPPORTED -#include "soc/gdma_channel.h" #include "hal/gdma_ll.h" #endif /* SOC_GDMA_SUPPORTED */ diff --git a/components/soc/esp32/include/soc/gdma_channel.h b/components/soc/esp32/include/soc/gdma_channel.h deleted file mode 100644 index aecba2714e..0000000000 --- a/components/soc/esp32/include/soc/gdma_channel.h +++ /dev/null @@ -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. diff --git a/components/soc/esp32s2/include/soc/gdma_channel.h b/components/soc/esp32s2/include/soc/gdma_channel.h deleted file mode 100644 index 33f39749d2..0000000000 --- a/components/soc/esp32s2/include/soc/gdma_channel.h +++ /dev/null @@ -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. diff --git a/docs/doxygen/Doxyfile_esp32c5 b/docs/doxygen/Doxyfile_esp32c5 index e8aa39b2aa..ef1c0e0e20 100644 --- a/docs/doxygen/Doxyfile_esp32c5 +++ b/docs/doxygen/Doxyfile_esp32c5 @@ -1,7 +1,7 @@ INPUT += \ $(PROJECT_PATH)/components/esp_driver_bitscrambler/include/driver/bitscrambler.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_uart.h \ $(PROJECT_PATH)/components/ulp/lp_core/include/lp_core_etm.h \ diff --git a/docs/doxygen/Doxyfile_esp32p4 b/docs/doxygen/Doxyfile_esp32p4 index 46c1bba702..76c8754cb8 100644 --- a/docs/doxygen/Doxyfile_esp32p4 +++ b/docs/doxygen/Doxyfile_esp32p4 @@ -39,7 +39,7 @@ INPUT += \ $(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_by_on_chip_ldo.h \ - $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/bitscrambler_peri_select.h \ + $(PROJECT_PATH)/components/esp_hal_dma/esp32p4/include/hal/bitscrambler_peri_select.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_spi.h \ diff --git a/tools/ci/check_soc_headers_leak.py b/tools/ci/check_soc_headers_leak.py index 62a58c72a9..c334f7610c 100755 --- a/tools/ci/check_soc_headers_leak.py +++ b/tools/ci/check_soc_headers_leak.py @@ -19,7 +19,6 @@ allowed_soc_headers = ( 'soc/reg_base.h', 'soc/clk_tree_defs.h', 'soc/uart_channel.h', - 'soc/bitscrambler_peri_select.h', ) include_header_pattern = re.compile(r'[\s]*#[\s]*include ["<](.*)[">].*') @@ -33,7 +32,7 @@ class PublicAPIVisits: self._idf_path = idf_path 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: line = line.strip() if line.startswith('$(PROJECT_PATH)'): @@ -48,10 +47,10 @@ def check_soc_not_in( idf_path: str, target: str, doxyfile_path: str, - violation_dict: typing.Dict[str, set], + violation_dict: dict[str, set], ) -> None: 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: match_data = re.match(include_header_pattern, line) if match_data: @@ -82,7 +81,7 @@ def main() -> None: print('No targets found', file=sys.stderr) sys.exit(1) - soc_violation_dict: typing.Dict[str, set] = {} + soc_violation_dict: dict[str, set] = {} for target in targets: check_soc_not_in( idf_path,