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

Method flash_erase

mpython/extFlash/lib/spiflash.py:151–158  ·  view source on GitHub ↗
(self, addr)

Source from the content-addressed store, hash-verified

149 pos += size
150
151 def flash_erase(self, addr):
152 self._cs(0)
153 self._write_cmd(CMD_WRITE_ENABLE)
154 self._cs(1)
155 # _write_addr() sets _cs low
156 self._write_addr(self._cmds[_SECTOR_ERASE_INDEX], addr)
157 self._cs(1)
158 self.wait()

Callers 2

writeblocksMethod · 0.80
ioctlMethod · 0.80

Calls 3

_write_cmdMethod · 0.95
_write_addrMethod · 0.95
waitMethod · 0.95

Tested by

no test coverage detected