start bbnow and deps

This commit is contained in:
2026-07-19 17:49:47 -05:00
parent 59d038efc2
commit 562b6cea8b
9 changed files with 125 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
#include "blk_box_drivers/nvs.hpp"
#include "nvs_flash.h"
void init_nvs() {
// TODO: do more once we are doing more with nvs.
esp_err_t ret = nvs_flash_init();
if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
// TODO: dont just erase, but also handle the case where we have to upgrade the nvs partition.
ESP_ERROR_CHECK( nvs_flash_erase() );
ret = nvs_flash_init();
}
ESP_ERROR_CHECK( ret );
}