Code cleanup.

This commit is contained in:
2018-06-22 08:08:38 +01:00
parent 82f474c7e3
commit 88da8fc019
581 changed files with 22423 additions and 20839 deletions

View File

@@ -40,9 +40,12 @@ namespace DiscImageChef.Devices
{
buffer = new byte[64];
LastError = SendMmcCommand((MmcCommands)SecureDigitalCommands.SendStatus, false, true,
MmcFlags.ResponseSpiR1 | MmcFlags.ResponseR1 | MmcFlags.CommandAdtc, 0, 64, 1,
ref buffer, out response, out duration, out bool sense, timeout);
LastError = SendMmcCommand((MmcCommands)SecureDigitalCommands.SendStatus, false,
true,
MmcFlags.ResponseSpiR1 | MmcFlags.ResponseR1 | MmcFlags.CommandAdtc, 0,
64, 1,
ref buffer,
out response, out duration, out bool sense, timeout);
Error = LastError != 0;
DicConsole.DebugWriteLine("SecureDigital Device", "SD_STATUS took {0} ms.", duration);
@@ -54,9 +57,12 @@ namespace DiscImageChef.Devices
{
buffer = new byte[4];
LastError = SendMmcCommand((MmcCommands)SecureDigitalCommands.SendOperatingCondition, false, true,
MmcFlags.ResponseSpiR3 | MmcFlags.ResponseR3 | MmcFlags.CommandBcr, 0, 4, 1,
ref buffer, out response, out duration, out bool sense, timeout);
LastError = SendMmcCommand((MmcCommands)SecureDigitalCommands.SendOperatingCondition, false,
true,
MmcFlags.ResponseSpiR3 | MmcFlags.ResponseR3 | MmcFlags.CommandBcr, 0,
4, 1,
ref buffer, out response,
out duration, out bool sense, timeout);
Error = LastError != 0;
DicConsole.DebugWriteLine("SecureDigital Device", "SD_SEND_OP_COND took {0} ms.", duration);
@@ -68,9 +74,12 @@ namespace DiscImageChef.Devices
{
buffer = new byte[8];
LastError = SendMmcCommand((MmcCommands)SecureDigitalCommands.SendScr, false, true,
MmcFlags.ResponseSpiR1 | MmcFlags.ResponseR1 | MmcFlags.CommandAdtc, 0, 8, 1,
ref buffer, out response, out duration, out bool sense, timeout);
LastError = SendMmcCommand((MmcCommands)SecureDigitalCommands.SendScr, false,
true,
MmcFlags.ResponseSpiR1 | MmcFlags.ResponseR1 | MmcFlags.CommandAdtc, 0,
8, 1,
ref buffer,
out response, out duration, out bool sense, timeout);
Error = LastError != 0;
DicConsole.DebugWriteLine("SecureDigital Device", "SEND_SCR took {0} ms.", duration);