| 47 | // endregion file_system stub |
| 48 | |
| 49 | static esp_err_t initNvsFlashSafely() { |
| 50 | esp_err_t result = nvs_flash_init(); |
| 51 | if (result == ESP_ERR_NVS_NO_FREE_PAGES || result == ESP_ERR_NVS_NEW_VERSION_FOUND) { |
| 52 | ESP_ERROR_CHECK(nvs_flash_erase()); |
| 53 | result = nvs_flash_init(); |
| 54 | } |
| 55 | return result; |
| 56 | } |
| 57 | |
| 58 | static wl_handle_t data_wl_handle = WL_INVALID_HANDLE; |
| 59 |