32 lines
613 B
C++

/// © MiroZ 2024
#include <stdint.h>
#include <Arduino.h>
#include "bootloader_random.h"
#include <esp_log.h>
#include <SPI.h>
#include <errno.h>
#include "TaskFactory.h"
#include "esp_task_wdt.h"
#include "App.h"
static const char * TAG = "main";
extern "C" void app_main(void)
{
bootloader_random_enable();
initArduino();
ESP_ERROR_CHECK(esp_task_wdt_init(15, false));
ESP_LOGW(TAG, "Starting the app...");
App * app = new App();
app->init();
app->start();
ESP_LOGI(TAG, "stack high water mark %d", TaskFactory::getStackHighWaterMark());
// we're no longer needed
TaskFactory::deleteTask();
}