![]() ![]() # CMD24: set write address for single block If self.cmd(18, block_num * self.cdv, 0, release=False) != 0:Īssert nblocks and not err, "Buffer length is invalid" ![]() # CMD18: set read address for multiple blocks If self.cmd(17, block_num * self.cdv, 0, release=False) != 0: # CMD17: set read address for single block If ((1, 0xFF) & 0x1F) != 0x05:Īssert nblocks and not len(buf) % 512, "Buffer length is invalid" Raise OSError("timeout waiting for response") # this could be a big-endian integer that we are getting here Raise OSError("timeout waiting for v2 card")ĭef cmd(self, cmd, arg, crc, final=0, release=True, skip1=False): Raise OSError("timeout waiting for v1 card") # set to high data rate now that it's initialised Raise OSError("can't set 512 block size") Raise OSError("SD card CSD format not supported") Sd = sdcard.SDCard(machine.SPI(1), machine.Pin(15)) Methods so the device can be mounted as a filesystem. MicroPython driver for SD cards using SPI bus.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |