From e99a1e1bdd798a913a5bb2d9461d242235a8987c Mon Sep 17 00:00:00 2001 From: "Planck (Lu Zeyu)" Date: Fri, 18 Aug 2023 19:49:50 +0800 Subject: [PATCH] fix(intr_flags_to_level): fix value returned one more than correct value --- components/esp_hw_support/include/esp_intr_alloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_hw_support/include/esp_intr_alloc.h b/components/esp_hw_support/include/esp_intr_alloc.h index e60b841988..c9b1eafb86 100644 --- a/components/esp_hw_support/include/esp_intr_alloc.h +++ b/components/esp_hw_support/include/esp_intr_alloc.h @@ -305,7 +305,7 @@ void esp_intr_disable_source(int inum); */ static inline int esp_intr_flags_to_level(int flags) { - return __builtin_ffs((flags & ESP_INTR_FLAG_LEVELMASK) >> 1) + 1; + return __builtin_ffs((flags & ESP_INTR_FLAG_LEVELMASK) >> 1); } /**