From 99935402b91160ff3a71c81b6fcd036545ea9111 Mon Sep 17 00:00:00 2001 From: Marius Vikhammer Date: Fri, 29 Aug 2025 15:16:07 +0800 Subject: [PATCH] fix(interrupts): removed deprecated intr_types.h and interrupt_deprecated.h headers intr_types.h has been replaced by esp_intr_types.h and the deprecated esprv_intc_* from interrupt_deprecated.h have been replaced by the more generic esprv_* functions. --- .../esp_hw_support/include/intr_types.h | 25 ---- .../esp_private/interrupt_deprecated.h | 112 ------------------ components/riscv/include/riscv/interrupt.h | 7 +- .../release-6.x/6.0/system.rst | 4 + .../release-6.x/6.0/system.rst | 4 + 5 files changed, 10 insertions(+), 142 deletions(-) delete mode 100644 components/esp_hw_support/include/intr_types.h delete mode 100644 components/riscv/include/esp_private/interrupt_deprecated.h diff --git a/components/esp_hw_support/include/intr_types.h b/components/esp_hw_support/include/intr_types.h deleted file mode 100644 index 8b5b98cbb3..0000000000 --- a/components/esp_hw_support/include/intr_types.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ -#pragma once - -#warning "This header is deprecated. Please use esp_intr_types.h instead" - -#include "esp_intr_types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/// @brief legacy type compatibility -typedef esp_intr_cpu_affinity_t intr_cpu_id_t; -#define INTR_CPU_CONVERT_ID ESP_INTR_CPU_AFFINITY_TO_CORE_ID -#define INTR_CPU_ID_AUTO ESP_INTR_CPU_AFFINITY_AUTO -#define INTR_CPU_ID_0 ESP_INTR_CPU_AFFINITY_0 -#define INTR_CPU_ID_1 ESP_INTR_CPU_AFFINITY_1 - -#ifdef __cplusplus -} -#endif diff --git a/components/riscv/include/esp_private/interrupt_deprecated.h b/components/riscv/include/esp_private/interrupt_deprecated.h deleted file mode 100644 index 6e1c6f87dc..0000000000 --- a/components/riscv/include/esp_private/interrupt_deprecated.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#pragma once - -#include -#include "riscv/interrupt.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/*************************** Former API / Backport compatibility ***************************/ - - -/** - * @brief Enable interrupts from interrupt controller. - * - * @param uint32_t unmask, unmask bits for interrupts, each bit for an interrupt - * - * return none - */ -void esprv_intc_int_enable(uint32_t unmask) __attribute__((deprecated("please use esprv_int_enable instead"))); - -/** - * @brief Disable interrupts from interrupt controller. - * - * @param uint32_t mask, mask bits for interrupts, each bit for an interrupt - * - * return none - */ -void esprv_intc_int_disable(uint32_t mask) __attribute__((deprecated("please use esprv_int_disable instead"))); - -/** - * @brief Set interrupt type - * - * Set the type of a particular interrupt (level or edge). - * - Level interrupts are cleared automatically once their interrupt source has - * been cleared - * - Edge interrupts must be cleared by software when they are handled. - * - * @param intr_num Interrupt number - * @param type Interrupt type - */ -void esprv_intc_int_set_type(int intr_num, enum intr_type type) __attribute__((deprecated("please use esprv_int_set_type instead"))); - -/** - * @brief Get the current type of an interrupt - * - * Get the current type of a particular interrupt (level or edge). An interrupt's - * type can be set by calling esprv_intc_int_set_type(). - * - * @param intr_num Interrupt number - * @return Interrupt type - */ -static inline __attribute__((deprecated("please use esprv_int_get_type instead"))) enum intr_type esprv_intc_int_get_type(int intr_num) -{ - return esprv_int_get_type(intr_num); -} - -/** - * Set interrupt priority in the interrupt controller - * @param rv_int_num CPU interrupt number - * @param priority Interrupt priority level, 1 to 7 - */ -void esprv_intc_int_set_priority(int rv_int_num, int priority) __attribute__((deprecated("please use esprv_int_set_priority instead"))); - -/** - * @brief Get the current priority of an interrupt - * - * Get the current priority of an interrupt. - * - * @param rv_int_num CPU interrupt number - * @return Interrupt priority level, 1 to 7 - */ -static inline __attribute__((deprecated("please use esprv_int_get_priority instead"))) int esprv_intc_int_get_priority(int rv_int_num) -{ - return esprv_int_get_priority(rv_int_num); -} - -/** - * Set interrupt priority threshold. - * Interrupts with priority levels lower than the threshold are masked. - * - * @param priority_threshold Interrupt priority threshold, 0 to 7 - */ -void esprv_intc_int_set_threshold(int priority_threshold) __attribute__((deprecated("please use esprv_int_set_threshold instead"))); - -/** - * @brief Get interrupt unmask - * @param none - * @return uint32_t interrupt unmask - */ -static inline __attribute__((deprecated("please use esprv_get_interrupt_unmask instead"))) uint32_t esprv_intc_get_interrupt_unmask(void) -{ - return esprv_get_interrupt_unmask(); -} - -/** - * @brief Route the peripheral interrupt signal to the CPU - * @param periph_intr_source Peripheral interrupt number, one of ETS_XXX_SOURCE - * @param rv_int_num CPU interrupt number - */ -void intr_matrix_route(int periph_intr_source, int rv_int_num) __attribute__((deprecated("please use esp_rom_route_intr_matrix instead"))); - -#ifdef __cplusplus -} -#endif diff --git a/components/riscv/include/riscv/interrupt.h b/components/riscv/include/riscv/interrupt.h index a487c1c34b..8b5fddc829 100644 --- a/components/riscv/include/riscv/interrupt.h +++ b/components/riscv/include/riscv/interrupt.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -162,10 +162,7 @@ typedef uint32_t (*esprv_int_mgmt_t)(int argc, ...); */ void esprv_int_setup_mgmt_cb(void *fptr); -/** - * Include the deprecated functions last since they will alias the functions declared above - */ -#include "esp_private/interrupt_deprecated.h" + #ifdef __cplusplus } diff --git a/docs/en/migration-guides/release-6.x/6.0/system.rst b/docs/en/migration-guides/release-6.x/6.0/system.rst index b544f38be3..9b858ca496 100644 --- a/docs/en/migration-guides/release-6.x/6.0/system.rst +++ b/docs/en/migration-guides/release-6.x/6.0/system.rst @@ -56,6 +56,10 @@ HW-Support The deprecated ``soc_memory_types.h`` header file has been removed. Please include the replacement ``esp_memory_utils.h`` instead. +The deprecated ``intr_types.h`` header file has been removed. Please include the replacement ``esp_intr_types.h`` instead. + +The deprecated ``esp_private/interrupt_deprecated.h`` header file, which was available to users through the ``riscv/interrupt.h`` header, has been removed. The deprecated functions are no longer available, please use the non-deprecated versions instead. + App Trace ---------- diff --git a/docs/zh_CN/migration-guides/release-6.x/6.0/system.rst b/docs/zh_CN/migration-guides/release-6.x/6.0/system.rst index 5fdea05d47..d9ba136ad0 100644 --- a/docs/zh_CN/migration-guides/release-6.x/6.0/system.rst +++ b/docs/zh_CN/migration-guides/release-6.x/6.0/system.rst @@ -56,6 +56,10 @@ Xtensa 特殊寄存器头文件已更新,使用新的命名约定。旧的 ``s 已弃用的头文件 ``soc_memory_types.h`` 已被移除,请改用替代头文件 ``esp_memory_utils.h``。 +已弃用的头文件 ``intr_types.h`` 已被移除,请改用替代头文件 ``esp_intr_types.h``。 + +已弃用的头文件 ``esp_private/interrupt_deprecated.h`` 已被移除,已弃用的函数不再可用,请改用非弃用版本。 + App 追踪 ----------