use spi_flash_read to load stored config

This commit is contained in:
Morgan Allen 2018-09-02 17:27:51 -07:00
parent db575da69a
commit 7d0963e3f5
1 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@
#include "esp_log.h"
#include "esp_heap_caps.h"
#include "esp_spi_flash.h"
#include "driver/gpio.h"
#include "driver/spi_common.h"
@ -21,7 +22,7 @@ static struct wifi_man_ap_store {
} wifi_man_ap_store;
void wifi_man_init_config() {
memset(&wifi_man_ap_store, 0, sizeof(struct wifi_man_ap_store));
spi_flash_read(CONFIG_WIFI_MANAGER_MEM_ADDR, &wifi_man_ap_store, sizeof(struct wifi_man_ap_store));
}
int wifi_man_load_config() {