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

Method init_card_v1

mpython/lib/sdcard.py:119–128  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

117 self.init_spi(baudrate)
118
119 def init_card_v1(self):
120 for i in range(_CMD_TIMEOUT):
121 time.sleep_ms(50)
122 self.cmd(55, 0, 0)
123 if self.cmd(41, 0, 0) == 0:
124 # SDSC card, uses byte addressing in read/write/erase commands
125 self.cdv = 512
126 # print("[SDCard] v1 card")
127 return
128 raise OSError("timeout waiting for v1 card")
129
130 def init_card_v2(self):
131 for i in range(_CMD_TIMEOUT):

Callers 1

init_cardMethod · 0.95

Calls 1

cmdMethod · 0.95

Tested by

no test coverage detected