[ESP8266] Fixes namespace collision

pull/8959/head
Veijo Pesonen 2018-12-10 15:05:34 +02:00
parent 02aeab29d3
commit e4de165a32
2 changed files with 8 additions and 8 deletions

View File

@ -111,14 +111,14 @@ ESP8266Interface::~ESP8266Interface()
} }
// Power down the modem // Power down the modem
_rst_pin.assert(); _rst_pin.rst_assert();
} }
ESP8266Interface::ResetPin::ResetPin(PinName rst_pin) : _rst_pin(mbed::DigitalOut(rst_pin, 1)) ESP8266Interface::ResetPin::ResetPin(PinName rst_pin) : _rst_pin(mbed::DigitalOut(rst_pin, 1))
{ {
} }
void ESP8266Interface::ResetPin::assert() void ESP8266Interface::ResetPin::rst_assert()
{ {
if (_rst_pin.is_connected()) { if (_rst_pin.is_connected()) {
_rst_pin = 0; _rst_pin = 0;
@ -126,7 +126,7 @@ void ESP8266Interface::ResetPin::assert()
} }
} }
void ESP8266Interface::ResetPin::deassert() void ESP8266Interface::ResetPin::rst_deassert()
{ {
if (_rst_pin.is_connected()) { if (_rst_pin.is_connected()) {
// Notice that Pin7 CH_EN cannot be left floating if used as reset // Notice that Pin7 CH_EN cannot be left floating if used as reset
@ -270,7 +270,7 @@ int ESP8266Interface::disconnect()
} }
// Power down the modem // Power down the modem
_rst_pin.assert(); _rst_pin.rst_assert();
return ret; return ret;
} }
@ -377,11 +377,11 @@ nsapi_error_t ESP8266Interface::_init(void)
void ESP8266Interface::_hw_reset() void ESP8266Interface::_hw_reset()
{ {
_rst_pin.assert(); _rst_pin.rst_assert();
// If you happen to use Pin7 CH_EN as reset pin, not needed otherwise // If you happen to use Pin7 CH_EN as reset pin, not needed otherwise
// https://www.espressif.com/sites/default/files/documentation/esp8266_hardware_design_guidelines_en.pdf // https://www.espressif.com/sites/default/files/documentation/esp8266_hardware_design_guidelines_en.pdf
wait_us(200); wait_us(200);
_rst_pin.deassert(); _rst_pin.rst_deassert();
} }
nsapi_error_t ESP8266Interface::_startup(const int8_t wifi_mode) nsapi_error_t ESP8266Interface::_startup(const int8_t wifi_mode)

View File

@ -325,8 +325,8 @@ private:
class ResetPin { class ResetPin {
public: public:
ResetPin(PinName rst_pin); ResetPin(PinName rst_pin);
void assert(); void rst_assert();
void deassert(); void rst_deassert();
bool is_connected(); bool is_connected();
private: private:
mbed::DigitalOut _rst_pin; mbed::DigitalOut _rst_pin;