REFACTOR: Final cleanup of DiscImageChef.Devices.

This commit is contained in:
2017-12-23 20:04:36 +00:00
parent e5c92090a1
commit 536888507f
45 changed files with 2811 additions and 2688 deletions

View File

@@ -38,9 +38,9 @@ namespace DiscImageChef.Devices
public partial class Device
{
/// <summary>
/// Sends the ATA IDENTIFY DEVICE command to the device, using default device timeout
/// Sends the ATA IDENTIFY DEVICE command to the device, using default device timeout
/// </summary>
/// <returns><c>true</c> if the command failed and <paramref name="statusRegisters"/> contains the error registers.</returns>
/// <returns><c>true</c> if the command failed and <paramref name="statusRegisters" /> contains the error registers.</returns>
/// <param name="buffer">Buffer.</param>
/// <param name="statusRegisters">Status registers.</param>
public bool AtaIdentify(out byte[] buffer, out AtaErrorRegistersChs statusRegisters)
@@ -49,9 +49,9 @@ namespace DiscImageChef.Devices
}
/// <summary>
/// Sends the ATA IDENTIFY DEVICE command to the device, using default device timeout
/// Sends the ATA IDENTIFY DEVICE command to the device, using default device timeout
/// </summary>
/// <returns><c>true</c> if the command failed and <paramref name="statusRegisters"/> contains the error registers.</returns>
/// <returns><c>true</c> if the command failed and <paramref name="statusRegisters" /> contains the error registers.</returns>
/// <param name="buffer">Buffer.</param>
/// <param name="statusRegisters">Status registers.</param>
/// <param name="duration">Duration.</param>
@@ -61,9 +61,9 @@ namespace DiscImageChef.Devices
}
/// <summary>
/// Sends the ATA IDENTIFY DEVICE command to the device
/// Sends the ATA IDENTIFY DEVICE command to the device
/// </summary>
/// <returns><c>true</c> if the command failed and <paramref name="statusRegisters"/> contains the error registers.</returns>
/// <returns><c>true</c> if the command failed and <paramref name="statusRegisters" /> contains the error registers.</returns>
/// <param name="buffer">Buffer.</param>
/// <param name="statusRegisters">Status registers.</param>
/// <param name="timeout">Timeout.</param>
@@ -73,9 +73,9 @@ namespace DiscImageChef.Devices
}
/// <summary>
/// Sends the ATA IDENTIFY DEVICE command to the device
/// Sends the ATA IDENTIFY DEVICE command to the device
/// </summary>
/// <returns><c>true</c> if the command failed and <paramref name="statusRegisters"/> contains the error registers.</returns>
/// <returns><c>true</c> if the command failed and <paramref name="statusRegisters" /> contains the error registers.</returns>
/// <param name="buffer">Buffer.</param>
/// <param name="statusRegisters">Status registers.</param>
/// <param name="timeout">Timeout.</param>
@@ -86,7 +86,6 @@ namespace DiscImageChef.Devices
buffer = new byte[512];
AtaRegistersChs registers = new AtaRegistersChs {Command = (byte)AtaCommands.IdentifyDevice};
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.PioIn,
AtaTransferRegister.NoTransfer, ref buffer, timeout, false, out duration,
out bool sense);
@@ -117,7 +116,6 @@ namespace DiscImageChef.Devices
Command = retry ? (byte)AtaCommands.ReadDmaRetry : (byte)AtaCommands.ReadDma
};
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.Dma, AtaTransferRegister.SectorCount,
ref buffer, timeout, true, out duration, out bool sense);
Error = LastError != 0;
@@ -141,7 +139,6 @@ namespace DiscImageChef.Devices
Sector = sector
};
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.PioIn,
AtaTransferRegister.SectorCount, ref buffer, timeout, true, out duration,
out bool sense);
@@ -172,7 +169,6 @@ namespace DiscImageChef.Devices
Sector = sector
};
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.PioIn,
AtaTransferRegister.SectorCount, ref buffer, timeout, true, out duration,
out bool sense);
@@ -204,7 +200,6 @@ namespace DiscImageChef.Devices
Sector = sector
};
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.PioIn,
AtaTransferRegister.SectorCount, ref buffer, timeout, true, out duration,
out bool sense);
@@ -228,7 +223,6 @@ namespace DiscImageChef.Devices
Sector = sector
};
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.NonData,
AtaTransferRegister.NoTransfer, ref buffer, timeout, true, out duration,
out bool sense);