From e5394440df33568d4871ba1d40b64bde5e4b8507 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 a800c94fe8..3af60b1e59 100644 --- a/components/esp_hw_support/include/esp_intr_alloc.h +++ b/components/esp_hw_support/include/esp_intr_alloc.h @@ -304,7 +304,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); } /**@}*/