This commit is contained in:
2025-05-25 00:49:53 -04:00
parent b97d632b90
commit 6a22649f76
23 changed files with 812 additions and 70 deletions

View File

@@ -1,3 +1,3 @@
idf_component_register(SRCS "main.cpp"
PRIV_REQUIRES spi_flash
PRIV_REQUIRES spi_flash nvs_flash esp_event rpc
INCLUDE_DIRS "")

View File

@@ -1,21 +1,26 @@
#include <stdio.h>
#include <inttypes.h>
#include <cstdio>
#include <cinttypes>
#include <memory>
#include "sdkconfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_chip_info.h"
#include "esp_flash.h"
#include "nvs_flash.h"
#include "WifiManager.h"
extern "C" [[noreturn]] void app_main(void) {
nvs_flash_init();
const auto manager = std::make_unique<WifiManager>();
manager->init();
extern "C" void app_main(void) {
printf("Hello world!\n");
for (int i = 10; i >= 0; i--) {
printf("Restarting in %d seconds...\n", i);
vTaskDelay(1000 / portTICK_PERIOD_MS);
for (int i = 0; ; i++) {
printf("Beat %d\n", i);
vTaskDelay(10000 / portTICK_PERIOD_MS);
}
printf("Restarting now\n");
fflush(stdout);
esp_restart();
}