DEV9: Run clang format on ATA code

This commit is contained in:
TheLastRar 2021-01-03 03:40:53 +00:00 committed by refractionpcsx2
parent dc3bd53f7b
commit b501a1deae
5 changed files with 11 additions and 10 deletions

View File

@ -31,7 +31,7 @@ class ATA
public:
//Transfer
bool dmaReady = false;
int nsector = 0; //sector count
int nsector = 0; //sector count
int nsectorLeft = 0; //sectors left to transfer
private:
const bool lba48Supported = false;
@ -51,7 +51,7 @@ private:
u8 curMultipleSectorsSetting = 128;
u8 identifyData[512] = { 0 };
u8 identifyData[512] = {0};
//LBA48 in use?
bool lba48 = false;
@ -143,7 +143,7 @@ private:
int pioPtr;
int pioEnd;
u8 pioBuffer[512];
int sectorsPerInterrupt;
void (ATA::*pioDRQEndTransferFunc)() = nullptr;
//PIO Buffer
@ -175,7 +175,7 @@ public:
u16 ATAreadPIO();
//ATAwritePIO;
private:
private:
//Info
void CreateHDDinfo(int sizeMb);
void CreateHDDinfoCsum();
@ -231,7 +231,7 @@ public:
void PostCmdDMADataFromHost();
void HDD_ReadDMA(bool isLBA48);
void HDD_WriteDMA(bool isLBA48);
void PreCmdExecuteDeviceDiag();
void PostCmdExecuteDeviceDiag();
void HDD_ExecuteDeviceDiag();
@ -273,4 +273,3 @@ public:
static void WriteUInt64(u8* data, int* index, u64 value);
static void WritePaddedString(u8* data, int* index, std::string value, u32 len);
};

View File

@ -260,6 +260,7 @@ void ATA::CreateHDDinfo(int sizeMb)
//Command set/feature enabled/supported (See word 82)
WriteUInt16(identifyData, &index, (u16)((fetSmartEnabled << 0) | (fetSecurityEnabled << 1) | (fetWriteCacheEnabled << 5) | (fetHostProtectedAreaEnabled << 10) | (1 << 14))); //Fixed //word 85
//Command set/feature enabled/supported (See word 83)
// clang-format off
WriteUInt16(identifyData, &index, (u16)(
/*(1 << 8) | //SET MAX */
((lba48Supported ? 1 : 0) << 10) | //Fixed
@ -270,6 +271,7 @@ void ATA::CreateHDDinfo(int sizeMb)
WriteUInt16(identifyData, &index, (u16)(
(1) | //Fixed
((1) << 1))); //Fixed //word 87
// clang-format on
//UDMA modes
/*
* bits 0-7: ultraword modes supported (0,1,2,4,5,6,7)

View File

@ -310,7 +310,7 @@ void ATA::Async(uint cycles)
if (waitingCmd != nullptr) //Are we waiting to continue a command?
{
//Log_Info("Running waiting command");
void(ATA::*cmd)() = waitingCmd;
void (ATA::*cmd)() = waitingCmd;
waitingCmd = nullptr;
(this->*cmd)();
}

View File

@ -38,7 +38,7 @@ void ATA::IO_Thread()
ioType = 0;
else if (ioWrite)
ioType = 1;
ioWaitHandle.unlock();
//Read or Write

View File

@ -269,7 +269,7 @@ s32 DEV9open(void* pDsp)
ghc::filesystem::path path(GetSettingsFolder().ToUTF8().data());
hddPath = path / hddPath;
}
if (config.hddEnable)
{
if (dev9.ata->Open(hddPath) != 0)
@ -876,7 +876,7 @@ void DEV9write16(u32 addr, u16 value)
dev9.fifo_bytes_write = 0;
dev9.fifo_bytes_read = 0;
dev9.xfr_ctrl &= ~SPD_XFR_WRITE; //?
dev9.if_ctrl |= SPD_IF_READ; //?
dev9.if_ctrl |= SPD_IF_READ; //?
FIFOIntr();
}