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

Method write_token

mpython/lib/sdcard.py:234–243  ·  view source on GitHub ↗
(self, token)

Source from the content-addressed store, hash-verified

232 self.spi.write(b"\xff")
233
234 def write_token(self, token):
235 self.cs(0)
236 self.spi.read(1, token)
237 self.spi.write(b"\xff")
238 # wait for write to finish
239 while self.spi.read(1, 0xFF)[0] == 0x00:
240 pass
241
242 self.cs(1)
243 self.spi.write(b"\xff")
244
245 def readblocks(self, block_num, buf):
246 # workaround for shared bus, required for (at least) some Kingston

Callers 1

writeblocksMethod · 0.95

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected