MCPcopy Create free account
hub / github.com/RetiredWizard/PyDOS / reset

Method reset

mpython/NanoConnect/lib/mp_esp32spi.py:200–213  ·  view source on GitHub ↗

Hard reset the ESP32 using the reset pin

(self)

Source from the content-addressed store, hash-verified

198 raise RuntimeError("Failed to write to pin")
199
200 def reset(self):
201 """Hard reset the ESP32 using the reset pin"""
202 if self._debug:
203 print("Reset ESP32")
204 if self._gpio0:
205 self._gpio0.direction = Direction.OUTPUT
206 self._gpio0.value(True) # not bootload mode
207 self._cs.value(True)
208 self._reset.value(False)
209 time.sleep(0.01) # reset
210 self._reset.value(True)
211 time.sleep(0.75) # wait for it to boot up
212 #if self._gpio0:
213 #self._gpio0.direction = Direction.INPUT
214
215
216 def _wait_for_ready(self):

Callers 1

__init__Method · 0.95

Calls 1

valueMethod · 0.80

Tested by

no test coverage detected