Added the ESP-wifi-config submodule to the ESP-RTOS and also add a example

This commit is contained in:
Rutger Huijgen 2020-04-18 20:02:27 +02:00
parent c97ef10267
commit e7a95326d3
4 changed files with 41 additions and 0 deletions

View file

@ -0,0 +1,19 @@
#include <stdio.h>
#include <esp/uart.h>
#include "wifi_config.h"
void on_wifi_event(wifi_config_event_t event) {
if (event == WIFI_CONFIG_CONNECTED) {
printf("Connected to WiFi\n");
} else if (event == WIFI_CONFIG_DISCONNECTED) {
printf("Disconnected from WiFi\n");
}
}
void user_init(void) {
uart_set_baud(0, 115200);
wifi_config_init2("my-accessory", NULL, on_wifi_event);
}