Skip to content

Commit e4de165

Browse files
author
Veijo Pesonen
committed
[ESP8266] Fixes namespace collision
1 parent 02aeab2 commit e4de165

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

components/wifi/esp8266-driver/ESP8266Interface.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,22 +111,22 @@ ESP8266Interface::~ESP8266Interface()
111111
}
112112

113113
// Power down the modem
114-
_rst_pin.assert();
114+
_rst_pin.rst_assert();
115115
}
116116

117117
ESP8266Interface::ResetPin::ResetPin(PinName rst_pin) : _rst_pin(mbed::DigitalOut(rst_pin, 1))
118118
{
119119
}
120120

121-
void ESP8266Interface::ResetPin::assert()
121+
void ESP8266Interface::ResetPin::rst_assert()
122122
{
123123
if (_rst_pin.is_connected()) {
124124
_rst_pin = 0;
125125
tr_debug("HW reset asserted");
126126
}
127127
}
128128

129-
void ESP8266Interface::ResetPin::deassert()
129+
void ESP8266Interface::ResetPin::rst_deassert()
130130
{
131131
if (_rst_pin.is_connected()) {
132132
// Notice that Pin7 CH_EN cannot be left floating if used as reset
@@ -270,7 +270,7 @@ int ESP8266Interface::disconnect()
270270
}
271271

272272
// Power down the modem
273-
_rst_pin.assert();
273+
_rst_pin.rst_assert();
274274

275275
return ret;
276276
}
@@ -377,11 +377,11 @@ nsapi_error_t ESP8266Interface::_init(void)
377377

378378
void ESP8266Interface::_hw_reset()
379379
{
380-
_rst_pin.assert();
380+
_rst_pin.rst_assert();
381381
// If you happen to use Pin7 CH_EN as reset pin, not needed otherwise
382382
// https://www.espressif.com/sites/default/files/documentation/esp8266_hardware_design_guidelines_en.pdf
383383
wait_us(200);
384-
_rst_pin.deassert();
384+
_rst_pin.rst_deassert();
385385
}
386386

387387
nsapi_error_t ESP8266Interface::_startup(const int8_t wifi_mode)

components/wifi/esp8266-driver/ESP8266Interface.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,8 @@ class ESP8266Interface : public NetworkStack, public WiFiInterface {
325325
class ResetPin {
326326
public:
327327
ResetPin(PinName rst_pin);
328-
void assert();
329-
void deassert();
328+
void rst_assert();
329+
void rst_deassert();
330330
bool is_connected();
331331
private:
332332
mbed::DigitalOut _rst_pin;

0 commit comments

Comments
 (0)