return event group handle for wifi manager

This commit is contained in:
Morgan Allen 2018-09-03 19:52:07 -07:00
parent a1d175fbce
commit 82f88e28cb

View file

@ -190,7 +190,7 @@ void wifi_manager_load_config() {
ESP_LOGI(TAG, "load_config found %d APs", ap_store.count); ESP_LOGI(TAG, "load_config found %d APs", ap_store.count);
}; };
void wifi_manager_start() { EventGroupHandle_t wifi_manager_start() {
ESP_ERROR_CHECK(nvs_open("wm-config", NVS_READWRITE, &nvs)); ESP_ERROR_CHECK(nvs_open("wm-config", NVS_READWRITE, &nvs));
wm_event_group = xEventGroupCreate(); wm_event_group = xEventGroupCreate();
@ -198,4 +198,6 @@ void wifi_manager_start() {
wifi_manager_load_config(); wifi_manager_load_config();
xTaskCreate(&wifi_manager_main_loop, "wm_main_loop", 4096, NULL, 6, NULL); xTaskCreate(&wifi_manager_main_loop, "wm_main_loop", 4096, NULL, 6, NULL);
return wm_event_group;
}; };