Skip to content

Commit

Permalink
Removed setvbuf and added explicit nvs initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
dentellaluca committed Jan 3, 2018
1 parent 5812cc7 commit fcb14d3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions 02_wifi_connection/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit fcb14d3

Please sign in to comment.