public bool SetFeatures(out AtaErrorRegistersChs statusRegisters, AtaFeatures feature, ushort cylinder, byte head, byte sector, byte sectorCount, uint timeout, out double duration) { byte[] buffer = new byte[0]; var registers = new AtaRegistersChs { Command = (byte)AtaCommands.SetFeatures, CylinderHigh = (byte)((cylinder & 0xFF00) / 0x100), CylinderLow = (byte)((cylinder & 0xFF) / 0x1), DeviceHead = (byte)(head & 0x0F), Sector = sector, SectorCount = sectorCount, Feature = (byte)feature }; LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.NonData, AtaTransferRegister.NoTransfer, ref buffer, timeout, true, out duration, out bool sense); Error = LastError != 0; AaruConsole.DebugWriteLine("ATA Device", "SET FEATURES took {0} ms.", duration); return(sense); }
public bool SetFeatures(out AtaErrorRegistersChs statusRegisters, AtaFeatures feature, uint timeout, out double duration) => SetFeatures(out statusRegisters, feature, 0, 0, 0, 0, timeout, out duration);