Skip to content

Commit

Permalink
Merge pull request #601 from UncleRus/fix-mcp23x17-example
Browse files Browse the repository at this point in the history
fix: fix mcp23017 example for esp-idf < 5.0
  • Loading branch information
UncleRus authored Feb 3, 2024
2 parents d798bd4 + 46a2943 commit 8c1695b
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 8c1695b

Please sign in to comment.