Merge branch 'esp8266_link_type_fix' of ssh://github.com/c1728p9/mbed-os

pull/8832/head
Cruz Monrreal II 2018-12-18 13:23:44 -06:00
commit 9b9b81e9a4
2 changed files with 3 additions and 21 deletions

View File

@ -190,11 +190,6 @@ int ESP8266Interface::connect()
return NSAPI_ERROR_IS_CONNECTED;
}
status = _startup(ESP8266::WIFIMODE_STATION);
if (status != NSAPI_ERROR_OK) {
return status;
}
if (!_esp.dhcp(true, 1)) {
return NSAPI_ERROR_DHCP_FAILURE;
}
@ -315,11 +310,6 @@ int ESP8266Interface::scan(WiFiAccessPoint *res, unsigned count)
return status;
}
status = _startup(ESP8266::WIFIMODE_STATION);
if (status != NSAPI_ERROR_OK) {
return status;
}
return _esp.scan(res, count);
}
@ -370,6 +360,9 @@ nsapi_error_t ESP8266Interface::_init(void)
if (!_esp.cond_enable_tcp_passive_mode()) {
return NSAPI_ERROR_DEVICE_ERROR;
}
if (!_esp.startup(ESP8266::WIFIMODE_STATION)) {
return NSAPI_ERROR_DEVICE_ERROR;
}
_initialized = true;
}
@ -385,16 +378,6 @@ void ESP8266Interface::_hw_reset()
_rst_pin.rst_deassert();
}
nsapi_error_t ESP8266Interface::_startup(const int8_t wifi_mode)
{
if (_conn_stat == NSAPI_STATUS_DISCONNECTED) {
if (!_esp.startup(wifi_mode)) {
return NSAPI_ERROR_DEVICE_ERROR;
}
}
return NSAPI_ERROR_OK;
}
struct esp8266_socket {
int id;
nsapi_protocol_t proto;

View File

@ -353,7 +353,6 @@ private:
bool _get_firmware_ok();
nsapi_error_t _init(void);
void _hw_reset();
nsapi_error_t _startup(const int8_t wifi_mode);
//sigio
struct {