kopia lustrzana https://github.com/micropython/micropython-lib
micropython/drivers/storage/sdcard/sdcard.py: Added 0x7F CRC for two more writeblocks cmd calls
Signed-off-by: multicoder9 <205438007+multicoder9@users.noreply.github.com>pull/992/head
rodzic
3ddee7c04f
commit
d5f76e666c
|
@ -295,14 +295,14 @@ class SDCard:
|
|||
assert nblocks and not err, "Buffer length is invalid"
|
||||
if nblocks == 1:
|
||||
# CMD24: set write address for single block
|
||||
if self.cmd(24, block_num * self.cdv, 0) != 0:
|
||||
if self.cmd(24, block_num * self.cdv, 0x7F) != 0:
|
||||
raise OSError(5) # EIO
|
||||
|
||||
# send the data
|
||||
self.write(_TOKEN_DATA, buf)
|
||||
else:
|
||||
# CMD25: set write address for first block
|
||||
if self.cmd(25, block_num * self.cdv, 0) != 0:
|
||||
if self.cmd(25, block_num * self.cdv, 0x7F) != 0:
|
||||
raise OSError(5) # EIO
|
||||
# send the data
|
||||
offset = 0
|
||||
|
|
Ładowanie…
Reference in New Issue