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

Method __init__

mpython/lib/sdcard.py:42–54  ·  view source on GitHub ↗
(self, spi, cs, baudrate=1320000)

Source from the content-addressed store, hash-verified

40
41class SDCard:
42 def __init__(self, spi, cs, baudrate=1320000):
43 self.spi = spi
44 self.cs = cs
45
46 self.cmdbuf = bytearray(6)
47 self.dummybuf = bytearray(512)
48 self.tokenbuf = bytearray(1)
49 for i in range(512):
50 self.dummybuf[i] = 0xFF
51 self.dummybuf_memoryview = memoryview(self.dummybuf)
52
53 # initialise the card
54 self.init_card(baudrate)
55
56 def init_spi(self, baudrate):
57 try:

Callers

nothing calls this directly

Calls 1

init_cardMethod · 0.95

Tested by

no test coverage detected