Code: Select all
static bool _esp_wifi_started = false;
static bool espWiFiStart(){
if(_esp_wifi_started){
return true;
}
if(!wifiLowLevelInit()){
return false;
}
[b] esp_err_t err = esp_wifi_start();[/b]
if (err != ESP_OK) {
log_e("esp_wifi_start %d", err);
wifiLowLevelDeinit();
return false;
}
_esp_wifi_started = true;
return true;
}