File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
components/wifi/esp8266-driver Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,9 @@ ESP8266Interface::~ESP8266Interface()
109
109
if (_oob_event_id) {
110
110
_global_event_queue->cancel (_oob_event_id);
111
111
}
112
+
113
+ // Power down the modem
114
+ _rst_pin.assert ();
112
115
}
113
116
114
117
ESP8266Interface::ResetPin::ResetPin (PinName rst_pin) : _rst_pin(mbed::DigitalOut(rst_pin, 1 ))
@@ -119,9 +122,6 @@ void ESP8266Interface::ResetPin::assert()
119
122
{
120
123
if (_rst_pin.is_connected ()) {
121
124
_rst_pin = 0 ;
122
- // If you happen to use Pin7 CH_EN as reset pin, not needed otherwise
123
- // https://www.espressif.com/sites/default/files/documentation/esp8266_hardware_design_guidelines_en.pdf
124
- wait_us (200 );
125
125
tr_debug (" HW reset asserted" );
126
126
}
127
127
}
@@ -269,6 +269,9 @@ int ESP8266Interface::disconnect()
269
269
}
270
270
}
271
271
272
+ // Power down the modem
273
+ _rst_pin.assert ();
274
+
272
275
return ret;
273
276
}
274
277
@@ -375,6 +378,9 @@ nsapi_error_t ESP8266Interface::_init(void)
375
378
void ESP8266Interface::_hw_reset ()
376
379
{
377
380
_rst_pin.assert ();
381
+ // If you happen to use Pin7 CH_EN as reset pin, not needed otherwise
382
+ // https://www.espressif.com/sites/default/files/documentation/esp8266_hardware_design_guidelines_en.pdf
383
+ wait_us (200 );
378
384
_rst_pin.deassert ();
379
385
}
380
386
You can’t perform that action at this time.
0 commit comments