From 4934d700c9d41b20dec47a0d235c6438dcb835db Mon Sep 17 00:00:00 2001 From: wuzhenghui Date: Fri, 14 Oct 2022 15:27:19 +0800 Subject: [PATCH] bugfix: esprv_intc_int_set_type should not use bitmap parameter --- components/esp32c3/cache_err_int.c | 2 +- components/esp32c3/memprot.c | 2 +- components/hal/esp32c3/include/hal/interrupt_controller_ll.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/esp32c3/cache_err_int.c b/components/esp32c3/cache_err_int.c index 20cf2be2a2..81747139a2 100644 --- a/components/esp32c3/cache_err_int.c +++ b/components/esp32c3/cache_err_int.c @@ -58,7 +58,7 @@ void esp_cache_err_int_init(void) intr_matrix_set(core_id, ETS_CACHE_CORE0_ACS_INTR_SOURCE, ETS_CACHEERR_INUM); /* Set the type and priority to cache error interrupts. */ - esprv_intc_int_set_type(BIT(ETS_CACHEERR_INUM), INTR_TYPE_LEVEL); + esprv_intc_int_set_type(ETS_CACHEERR_INUM, INTR_TYPE_LEVEL); esprv_intc_int_set_priority(ETS_CACHEERR_INUM, SOC_INTERRUPT_LEVEL_MEDIUM); /* On the hardware side, stat by clearing all the bits reponsible for diff --git a/components/esp32c3/memprot.c b/components/esp32c3/memprot.c index b3d819284a..5729e0e968 100644 --- a/components/esp32c3/memprot.c +++ b/components/esp32c3/memprot.c @@ -458,7 +458,7 @@ void esp_memprot_set_intr_matrix(mem_type_prot_t mem_type) } /* Set the type and priority to cache error interrupts. */ - esprv_intc_int_set_type(BIT(ETS_MEMPROT_ERR_INUM), INTR_TYPE_LEVEL); + esprv_intc_int_set_type(ETS_MEMPROT_ERR_INUM, INTR_TYPE_LEVEL); esprv_intc_int_set_priority(ETS_MEMPROT_ERR_INUM, SOC_INTERRUPT_LEVEL_MEDIUM); ESP_INTR_ENABLE(ETS_MEMPROT_ERR_INUM); diff --git a/components/hal/esp32c3/include/hal/interrupt_controller_ll.h b/components/hal/esp32c3/include/hal/interrupt_controller_ll.h index 1957e0384b..b5d8bdd882 100644 --- a/components/hal/esp32c3/include/hal/interrupt_controller_ll.h +++ b/components/hal/esp32c3/include/hal/interrupt_controller_ll.h @@ -144,7 +144,7 @@ static inline void intr_cntrl_ll_set_int_level(int intr, int level) */ static inline void intr_cntrl_ll_set_int_type(int intr, int_type_t type) { - esprv_intc_int_set_type(BIT(intr), type); + esprv_intc_int_set_type(intr, type); } #ifdef __cplusplus