Add static_assert for MAIN_TASK_PRIORITY < configMAX_PRIORITIES

This commit is contained in:
J. Nick Koston
2026-03-02 15:30:21 -10:00
parent 7692ef6292
commit 49750eb3ad
+1
View File
@@ -38,6 +38,7 @@ void arch_init() {
// This is safe because ESPHome yields voluntarily via yield_with_select_() and
// the Arduino mainTask yield() after each loop() iteration.
static constexpr UBaseType_t MAIN_TASK_PRIORITY = 6;
static_assert(MAIN_TASK_PRIORITY < configMAX_PRIORITIES, "MAIN_TASK_PRIORITY must be less than configMAX_PRIORITIES");
vTaskPrioritySet(nullptr, MAIN_TASK_PRIORITY);
#endif
#if LT_GPIO_RECOVER