Solved reading multiple MMC/SD commands at a time.

This commit is contained in:
2017-09-29 13:01:16 +00:00
parent efb7331a98
commit a82071a3e3
3 changed files with 8 additions and 2 deletions

View File

@@ -84,7 +84,7 @@ namespace DiscImageChef.Core.Devices.Dumping
sidecar.BlockMedia[0].SecureDigital = new SecureDigitalType();
uint blocksToRead = 1;
uint blocksToRead = 128;
uint blockSize = 512;
ulong blocks = 0;
byte[] cid = null;

View File

@@ -59,7 +59,7 @@ namespace DiscImageChef.Core.Devices.Scanning
uint timeout = 5;
double duration = 0;
ushort currentProfile = 0x0001;
uint blocksToRead = 1;
uint blocksToRead = 128;
uint blockSize = 512;
bool byteAddressed = true;

View File

@@ -127,7 +127,13 @@ namespace DiscImageChef.Devices
error = lastError != 0;
if(transferLength > 1)
{
byte[] foo = new byte[0];
SendMmcCommand(MmcCommands.StopTransmission, false, false, MmcFlags.Response_R1b | MmcFlags.ResponseSPI_R1b | MmcFlags.CommandAC,
0, 0, 0, ref foo, out uint[] responseStop, out double stopDuration, out bool stopSense, timeout);
duration += stopDuration;
DicConsole.DebugWriteLine("MMC Device", "READ_MULTIPLE_BLOCK took {0} ms.", duration);
}
else
DicConsole.DebugWriteLine("MMC Device", "READ_SINGLE_BLOCK took {0} ms.", duration);