[1.0.5] Make looptask stack size configurable (#4564)
Added guarded define to set the stacksize on the main looptask. Advantage of this is that build_flags can be used to provide a different value for the stack size should it be neccessary default behaviour is unaffected
This commit is contained in:
parent
aac26a4d1e
commit
7d5bf9e385
@ -3,6 +3,10 @@
|
|||||||
#include "esp_task_wdt.h"
|
#include "esp_task_wdt.h"
|
||||||
#include "Arduino.h"
|
#include "Arduino.h"
|
||||||
|
|
||||||
|
#ifndef CONFIG_ARDUINO_LOOP_STACK_SIZE
|
||||||
|
#define CONFIG_ARDUINO_LOOP_STACK_SIZE 8192
|
||||||
|
#endif
|
||||||
|
|
||||||
TaskHandle_t loopTaskHandle = NULL;
|
TaskHandle_t loopTaskHandle = NULL;
|
||||||
|
|
||||||
#if CONFIG_AUTOSTART_ARDUINO
|
#if CONFIG_AUTOSTART_ARDUINO
|
||||||
@ -25,7 +29,7 @@ extern "C" void app_main()
|
|||||||
{
|
{
|
||||||
loopTaskWDTEnabled = false;
|
loopTaskWDTEnabled = false;
|
||||||
initArduino();
|
initArduino();
|
||||||
xTaskCreateUniversal(loopTask, "loopTask", 8192, NULL, 1, &loopTaskHandle, CONFIG_ARDUINO_RUNNING_CORE);
|
xTaskCreateUniversal(loopTask, "loopTask", CONFIG_ARDUINO_LOOP_STACK_SIZE, NULL, 1, &loopTaskHandle, CONFIG_ARDUINO_RUNNING_CORE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user