mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Solved reading multiple MMC/SD commands at a time.
This commit is contained in:
@@ -84,7 +84,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
|||||||
|
|
||||||
sidecar.BlockMedia[0].SecureDigital = new SecureDigitalType();
|
sidecar.BlockMedia[0].SecureDigital = new SecureDigitalType();
|
||||||
|
|
||||||
uint blocksToRead = 1;
|
uint blocksToRead = 128;
|
||||||
uint blockSize = 512;
|
uint blockSize = 512;
|
||||||
ulong blocks = 0;
|
ulong blocks = 0;
|
||||||
byte[] cid = null;
|
byte[] cid = null;
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ namespace DiscImageChef.Core.Devices.Scanning
|
|||||||
uint timeout = 5;
|
uint timeout = 5;
|
||||||
double duration = 0;
|
double duration = 0;
|
||||||
ushort currentProfile = 0x0001;
|
ushort currentProfile = 0x0001;
|
||||||
uint blocksToRead = 1;
|
uint blocksToRead = 128;
|
||||||
uint blockSize = 512;
|
uint blockSize = 512;
|
||||||
bool byteAddressed = true;
|
bool byteAddressed = true;
|
||||||
|
|
||||||
|
|||||||
@@ -127,7 +127,13 @@ namespace DiscImageChef.Devices
|
|||||||
error = lastError != 0;
|
error = lastError != 0;
|
||||||
|
|
||||||
if(transferLength > 1)
|
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);
|
DicConsole.DebugWriteLine("MMC Device", "READ_MULTIPLE_BLOCK took {0} ms.", duration);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
DicConsole.DebugWriteLine("MMC Device", "READ_SINGLE_BLOCK took {0} ms.", duration);
|
DicConsole.DebugWriteLine("MMC Device", "READ_SINGLE_BLOCK took {0} ms.", duration);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user