mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
REFACTOR: Reformat code.
This commit is contained in:
@@ -37,17 +37,20 @@ namespace DiscImageChef.Devices
|
||||
{
|
||||
public partial class Device
|
||||
{
|
||||
public bool EnableMediaCardPassThrough(out AtaErrorRegistersCHS statusRegisters, uint timeout, out double duration)
|
||||
public bool EnableMediaCardPassThrough(out AtaErrorRegistersCHS statusRegisters, uint timeout,
|
||||
out double duration)
|
||||
{
|
||||
return CheckMediaCardType(1, out statusRegisters, timeout, out duration);
|
||||
}
|
||||
|
||||
public bool DisableMediaCardPassThrough(out AtaErrorRegistersCHS statusRegisters, uint timeout, out double duration)
|
||||
public bool DisableMediaCardPassThrough(out AtaErrorRegistersCHS statusRegisters, uint timeout,
|
||||
out double duration)
|
||||
{
|
||||
return CheckMediaCardType(0, out statusRegisters, timeout, out duration);
|
||||
}
|
||||
|
||||
public bool CheckMediaCardType(byte feature, out AtaErrorRegistersCHS statusRegisters, uint timeout, out double duration)
|
||||
public bool CheckMediaCardType(byte feature, out AtaErrorRegistersCHS statusRegisters, uint timeout,
|
||||
out double duration)
|
||||
{
|
||||
byte[] buffer = new byte[0];
|
||||
AtaRegistersCHS registers = new AtaRegistersCHS();
|
||||
@@ -56,8 +59,9 @@ namespace DiscImageChef.Devices
|
||||
registers.command = (byte)AtaCommands.CheckMediaCardType;
|
||||
registers.feature = feature;
|
||||
|
||||
lastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.NonData, AtaTransferRegister.NoTransfer,
|
||||
ref buffer, timeout, false, out duration, out sense);
|
||||
lastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.NonData,
|
||||
AtaTransferRegister.NoTransfer, ref buffer, timeout, false, out duration,
|
||||
out sense);
|
||||
error = lastError != 0;
|
||||
|
||||
DicConsole.DebugWriteLine("ATA Device", "CHECK MEDIA CARD TYPE took {0} ms.", duration);
|
||||
@@ -65,5 +69,4 @@ namespace DiscImageChef.Devices
|
||||
return sense;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user