mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 17:05:36 +00:00
Add static_assert for MAIN_TASK_PRIORITY < configMAX_PRIORITIES
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user