Skip to content

Commit

Permalink
fix: fix mcp23017 example for esp-idf < 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
UncleRus committed Feb 3, 2024
1 parent d798bd4 commit 46a2943
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/mcp23x17/mcp23017/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ static void IRAM_ATTR intr_handler(void *arg)
// On interrupt set bit in event group
BaseType_t hp_task;
if (xEventGroupSetBitsFromISR(eg, BIT_BUTTON_CHANGED, &hp_task) != pdFAIL)
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
portYIELD_FROM_ISR(hp_task);
#else
portYIELD_FROM_ISR();
#endif
}

void button_handler(void *pvParameters)
Expand Down

0 comments on commit 46a2943

Please sign in to comment.