Ver Fonte

Merge branch 'bugfix/intr_flags_to_level' into 'master'

fix(intr_flags_to_level): fix value returned one more than correct value

See merge request espressif/esp-idf!25419
Lu Ze Yu há 2 anos atrás
pai
commit
3d020d9ed1
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      components/esp_hw_support/include/esp_intr_alloc.h

+ 1 - 1
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);
 }
 
 /**