mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-29 10:17:15 +02:00
Add Kconfig for IDF and option to disable HAL mutexes
IDF Options: - Autostart Arduino (implements app_main) - Disable HAL locks - Set HAL debug level - Auto-connect STA if configured (else will connect after WiFi.begin())
This commit is contained in:
@ -1,21 +1,16 @@
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "esp32-hal.h"
|
||||
|
||||
void initVariant() __attribute__((weak));
|
||||
void initVariant() {}
|
||||
#if CONFIG_AUTOSTART_ARDUINO
|
||||
|
||||
void init() __attribute__((weak));
|
||||
void init() {}
|
||||
extern "C" void initArduino();
|
||||
extern void loop();
|
||||
extern void setup();
|
||||
|
||||
void startWiFi() __attribute__((weak));
|
||||
void startWiFi() {}
|
||||
|
||||
void initWiFi() __attribute__((weak));
|
||||
void initWiFi() {}
|
||||
|
||||
extern void loop();
|
||||
extern void setup();
|
||||
|
||||
void loopTask(void *pvParameters)
|
||||
{
|
||||
bool setup_done = false;
|
||||
@ -31,9 +26,8 @@ void loopTask(void *pvParameters)
|
||||
|
||||
extern "C" void app_main()
|
||||
{
|
||||
init();
|
||||
initVariant();
|
||||
initWiFi();
|
||||
initArduino();
|
||||
xTaskCreatePinnedToCore(loopTask, "loopTask", 4096, NULL, 1, NULL, 1);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user