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

This commit is contained in:
Planck (Lu Zeyu) 2023-08-18 19:49:50 +08:00 committed by BOT
parent 949c2960b3
commit 0a6fba3fb9

View File

@ -311,7 +311,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);
}
/**@}*/