From 59de982280d2d2a0dd7a900736a5a436aa9b77c7 Mon Sep 17 00:00:00 2001 From: dentellaluca Date: Wed, 3 Jan 2018 15:11:38 +0100 Subject: [PATCH] Removed setvbuf and added explicit nvs initialization --- main/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main/main.c b/main/main.c index a458bb5..2a9900a 100644 --- a/main/main.c +++ b/main/main.c @@ -6,6 +6,7 @@ #include "esp_wifi.h" #include "esp_event_loop.h" #include "esp_log.h" +#include "nvs_flash.h" #define WIFI_SSID "MYSSID" #define WIFI_PASS "MYPASSWORD" @@ -68,8 +69,8 @@ void app_main() // disable the default wifi logging esp_log_level_set("wifi", ESP_LOG_NONE); - // disable stdout buffering - setvbuf(stdout, NULL, _IONBF, 0); + // initialize NVS + ESP_ERROR_CHECK(nvs_flash_init()); // create the event group to handle wifi events wifi_event_group = xEventGroupCreate();