File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
micropython/drivers/storage/sdcard Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change 1- metadata (description = "SDCard block device driver." , version = "0.1.0 " )
1+ metadata (description = "SDCard block device driver." , version = "0.1.1 " )
22
33module ("sdcard.py" , opt = 3 )
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ def init_card(self, baudrate):
9797 csd = bytearray (16 )
9898 self .readinto (csd )
9999 if csd [0 ] & 0xC0 == 0x40 : # CSD version 2.0
100- self .sectors = ((csd [8 ] << 8 | csd [9 ]) + 1 ) * 1024
100+ self .sectors = ((csd [7 ] << 16 | csd [ 8 ] << 8 | csd [9 ]) + 1 ) * 1024
101101 elif csd [0 ] & 0xC0 == 0x00 : # CSD version 1.0 (old, <=2GB)
102102 c_size = (csd [6 ] & 0b11 ) << 10 | csd [7 ] << 2 | csd [8 ] >> 6
103103 c_size_mult = (csd [9 ] & 0b11 ) << 1 | csd [10 ] >> 7
You can’t perform that action at this time.
0 commit comments