add init code

This commit is contained in:
Mitchell Marino 2026-03-26 17:58:25 -05:00
parent 4bf5fef40b
commit 6418e2062a

View File

@ -13,10 +13,13 @@
#include "esp_flash.h" #include "esp_flash.h"
#include "esp_system.h" #include "esp_system.h"
#include "blk_box.h" #include "blk_box.h"
#include "blk_box_drivers/i2c.h"
extern "C" void app_main(void) extern "C" void app_main(void) {
{ BlkBoxInitConfig blk_box_cfg = {};
printf(get_hello_world()); init_blk_box(blk_box_cfg);
i2c_test();
/* Print chip information */ /* Print chip information */
esp_chip_info_t chip_info; esp_chip_info_t chip_info;
@ -44,10 +47,10 @@ extern "C" void app_main(void)
printf("Minimum free heap size: %" PRIu32 " bytes\n", esp_get_minimum_free_heap_size()); printf("Minimum free heap size: %" PRIu32 " bytes\n", esp_get_minimum_free_heap_size());
for (int i = 10; i >= 0; i--) { for (int i = 10; i >= 0; i--) {
printf("Restarting in %d seconds...\n", i); printf("Doing nothing in %d seconds...\n", i);
vTaskDelay(1000 / portTICK_PERIOD_MS); vTaskDelay(1000 / portTICK_PERIOD_MS);
} }
printf("Restarting now.\n"); // printf("Restarting now.\n");
fflush(stdout); // fflush(stdout);
esp_restart(); // esp_restart();
} }