drivers/sdcard: Fix bug in computing number of sectors on SD Card.

This was a typo from the very first commit of this file.
pull/3857/merge
Damien George 2018-06-15 18:02:40 +10:00
rodzic 8b8c083625
commit 1747d15c3a
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -97,7 +97,7 @@ class SDCard:
csd = bytearray(16)
self.readinto(csd)
if csd[0] & 0xc0 == 0x40: # CSD version 2.0
self.sectors = ((csd[8] << 8 | csd[9]) + 1) * 2014
self.sectors = ((csd[8] << 8 | csd[9]) + 1) * 1024
elif csd[0] & 0xc0 == 0x00: # CSD version 1.0 (old, <=2GB)
c_size = csd[6] & 0b11 | csd[7] << 2 | (csd[8] & 0b11000000) << 4
c_size_mult = ((csd[9] & 0b11) << 1) | csd[10] >> 7