starting with component unit testing (running on device)

Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
2024-05-17 12:03:16 +02:00
parent 05f8519864
commit 0944d29597
18 changed files with 127 additions and 13 deletions

18
main/osr_ble.c Normal file
View File

@@ -0,0 +1,18 @@
#include "osr_ble.h"
#include <nvs.h>
#include <nvs_flash.h>
void nvs_init() {
esp_err_t ret = nvs_flash_init();
if (ret == ESP_ERR_NVS_NO_FREE_PAGES ||
ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
ESP_ERROR_CHECK(nvs_flash_erase());
ret = nvs_flash_init();
}
ESP_ERROR_CHECK(ret);
}
void osr_ble_init() {
nvs_init();
}