mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-06-29 03:50:58 +02:00
IDF add some defaults and allow Arduino to run in single-core mode
This commit is contained in:
@ -4,6 +4,12 @@
|
||||
|
||||
#if CONFIG_AUTOSTART_ARDUINO
|
||||
|
||||
#if CONFIG_FREERTOS_UNICORE
|
||||
#define ARDUINO_RUNNING_CORE 0
|
||||
#else
|
||||
#define ARDUINO_RUNNING_CORE 1
|
||||
#endif
|
||||
|
||||
void loopTask(void *pvParameters)
|
||||
{
|
||||
setup();
|
||||
@ -15,7 +21,7 @@ void loopTask(void *pvParameters)
|
||||
extern "C" void app_main()
|
||||
{
|
||||
initArduino();
|
||||
xTaskCreatePinnedToCore(loopTask, "loopTask", 4096, NULL, 1, NULL, 1);
|
||||
xTaskCreatePinnedToCore(loopTask, "loopTask", 4096, NULL, 1, NULL, ARDUINO_RUNNING_CORE);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user