mirror of
https://github.com/mist-devel/mist-firmware.git
synced 2026-02-10 01:39:53 +00:00
hdd.c: fix incorrect LBA increment for direct disk access/non direct-SD mode
This commit is contained in:
2
hdd.c
2
hdd.c
@@ -1355,8 +1355,8 @@ static inline void ATA_ReadSectors(unsigned char* tfr, unsigned short sector, un
|
||||
spi_write(sector_buffer, 512*MIN(blocks, SECTOR_BUFFER_SIZE/512));
|
||||
DisableFpga();
|
||||
}
|
||||
blocks-=MIN(blocks, SECTOR_BUFFER_SIZE/512);
|
||||
lba+=MIN(blocks, SECTOR_BUFFER_SIZE/512);
|
||||
blocks-=MIN(blocks, SECTOR_BUFFER_SIZE/512);
|
||||
}
|
||||
#ifndef SD_NO_DIRECT_MODE
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user