mirror of
https://github.com/fhgwright/SCSI2SD.git
synced 2024-12-26 22:30:54 +00:00
Fix bug with TEST UNIT READY on spi flash storage
This commit is contained in:
parent
b5cfe91cc5
commit
0f0a676f7c
@ -134,6 +134,11 @@ static void spiFlash_init(S2S_Device* dev)
|
||||
//spiFlash->capacity = (1 << spiFlashByte(0xFF)) / 512;
|
||||
// Record value in 512-byte sectors.
|
||||
spiFlash->capacity = 1 << (spiFlashByte(0xFF) - 9);
|
||||
|
||||
if (spiFlash->capacity > 0)
|
||||
{
|
||||
spiFlash->dev.mediaState |= MEDIA_PRESENT | MEDIA_INITIALISED;
|
||||
}
|
||||
|
||||
// Don't bother reading the rest. Deselecting will cancel the command.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user