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

Method writeblocks

mpython/extFlash/lib/flashbdev.py:33–36  ·  view source on GitHub ↗
(self, n, buf, offset=0)

Source from the content-addressed store, hash-verified

31 self.flash.flash_read(n * self.sectorsize + offset, buf)
32
33 def writeblocks(self, n, buf, offset=0):
34 if offset == 0:
35 self.flash.flash_erase(n * self.sectorsize)
36 self.flash.flash_write(n * self.sectorsize + offset, buf)
37
38 def ioctl(self, op, arg):
39 if op == 4: # MP_BLOCKDEV_IOCTL_BLOCK_COUNT

Callers

nothing calls this directly

Calls 2

flash_eraseMethod · 0.80
flash_writeMethod · 0.80

Tested by

no test coverage detected