diff --git a/00_empty/main/00_empty.c b/00_empty/main/00_empty.c index 7c7a73d..f95c285 100644 --- a/00_empty/main/00_empty.c +++ b/00_empty/main/00_empty.c @@ -15,5 +15,5 @@ void loop_task(void *pvParameter) void app_main() { - xTaskCreate(&loop_task, "loop_task", 512, NULL, 5, NULL); + xTaskCreate(&loop_task, "loop_task", 1024, NULL, 5, NULL); } diff --git a/01_wifi_scanner/main/main.c b/01_wifi_scanner/main/main.c index 10395a6..4ff75aa 100644 --- a/01_wifi_scanner/main/main.c +++ b/01_wifi_scanner/main/main.c @@ -4,6 +4,7 @@ #include "esp_event_loop.h" #include "esp_wifi.h" #include "esp_log.h" +#include "nvs_flash.h" #define MAX_APs 20 @@ -32,6 +33,9 @@ void loop_task(void *pvParameter) void app_main() { + // initialize NVS + ESP_ERROR_CHECK(nvs_flash_init()); + // initialize the tcp stack tcpip_adapter_init(); diff --git a/02_wifi_connection/main/main.c b/02_wifi_connection/main/main.c index a458bb5..2a9900a 100644 --- a/02_wifi_connection/main/main.c +++ b/02_wifi_connection/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(); diff --git a/12_accesspoint/main/main.c b/12_accesspoint/main/main.c index 328618a..7c48ec2 100644 --- a/12_accesspoint/main/main.c +++ b/12_accesspoint/main/main.c @@ -7,6 +7,7 @@ #include "esp_wifi.h" #include "esp_event_loop.h" #include "esp_log.h" +#include "nvs_flash.h" // set AP CONFIG values @@ -125,6 +126,9 @@ void app_main() // create the event group to handle wifi events event_group = xEventGroupCreate(); + + // initialize NVS + ESP_ERROR_CHECK(nvs_flash_init()); // initialize the tcp stack tcpip_adapter_init(); diff --git a/16_spiffs/components/spiffs/spiffs_vfs.c b/16_spiffs/components/spiffs/spiffs_vfs.c index 53749a4..e6eb62f 100644 --- a/16_spiffs/components/spiffs/spiffs_vfs.c +++ b/16_spiffs/components/spiffs/spiffs_vfs.c @@ -833,7 +833,7 @@ void vfs_spiffs_register() { } esp_vfs_t vfs = { - .fd_offset = 0, + //.fd_offset = 0, .flags = ESP_VFS_FLAG_DEFAULT, .write = &vfs_spiffs_write, .open = &vfs_spiffs_open,