REFACTOR: Reformat code.

This commit is contained in:
2017-12-19 20:33:03 +00:00
parent 77edc7c91c
commit e6f6ace80b
704 changed files with 82627 additions and 83641 deletions

View File

@@ -41,8 +41,9 @@ namespace DiscImageChef.Devices
buffer = new byte[64];
bool sense = false;
lastError = SendMmcCommand((MmcCommands)SecureDigitalCommands.SendStatus, false, true, MmcFlags.ResponseSPI_R1 | MmcFlags.Response_R1 | MmcFlags.CommandADTC,
0, 64, 1, ref buffer, out response, out duration, out sense, timeout);
lastError = SendMmcCommand((MmcCommands)SecureDigitalCommands.SendStatus, false, true,
MmcFlags.ResponseSPI_R1 | MmcFlags.Response_R1 | MmcFlags.CommandADTC, 0, 64, 1,
ref buffer, out response, out duration, out sense, timeout);
error = lastError != 0;
DicConsole.DebugWriteLine("SecureDigital Device", "SD_STATUS took {0} ms.", duration);
@@ -55,22 +56,24 @@ namespace DiscImageChef.Devices
buffer = new byte[4];
bool sense = false;
lastError = SendMmcCommand((MmcCommands)SecureDigitalCommands.SendOperatingCondition, false, true, MmcFlags.ResponseSPI_R3 | MmcFlags.Response_R3 | MmcFlags.CommandBCR,
0, 4, 1, ref buffer, out response, out duration, out sense, timeout);
lastError = SendMmcCommand((MmcCommands)SecureDigitalCommands.SendOperatingCondition, false, true,
MmcFlags.ResponseSPI_R3 | MmcFlags.Response_R3 | MmcFlags.CommandBCR, 0, 4, 1,
ref buffer, out response, out duration, out sense, timeout);
error = lastError != 0;
DicConsole.DebugWriteLine("SecureDigital Device", "SD_SEND_OP_COND took {0} ms.", duration);
return sense;
}
public bool ReadSCR(out byte[] buffer, out uint[] response, uint timeout, out double duration)
{
buffer = new byte[8];
bool sense = false;
lastError = SendMmcCommand((MmcCommands)SecureDigitalCommands.SendSCR, false, true, MmcFlags.ResponseSPI_R1 | MmcFlags.Response_R1 | MmcFlags.CommandADTC,
0, 8, 1, ref buffer, out response, out duration, out sense, timeout);
lastError = SendMmcCommand((MmcCommands)SecureDigitalCommands.SendSCR, false, true,
MmcFlags.ResponseSPI_R1 | MmcFlags.Response_R1 | MmcFlags.CommandADTC, 0, 8, 1,
ref buffer, out response, out duration, out sense, timeout);
error = lastError != 0;
DicConsole.DebugWriteLine("SecureDigital Device", "SEND_SCR took {0} ms.", duration);
@@ -78,4 +81,4 @@ namespace DiscImageChef.Devices
return sense;
}
}
}
}