EXI_DeviceAD16: Amend variable naming

Drops Hungarian Notation type prefixing and prefixed underscores.
This commit is contained in:
Lioncash 2017-02-07 14:57:39 -05:00
parent 2f74a6f552
commit 1f14b7f907
2 changed files with 32 additions and 32 deletions

View File

@ -13,7 +13,7 @@ CEXIAD16::CEXIAD16() = default;
void CEXIAD16::SetCS(int cs) void CEXIAD16::SetCS(int cs)
{ {
if (cs) if (cs)
m_uPosition = 0; m_position = 0;
} }
bool CEXIAD16::IsPresent() const bool CEXIAD16::IsPresent() const
@ -21,35 +21,35 @@ bool CEXIAD16::IsPresent() const
return true; return true;
} }
void CEXIAD16::TransferByte(u8& _byte) void CEXIAD16::TransferByte(u8& byte)
{ {
if (m_uPosition == 0) if (m_position == 0)
{ {
m_uCommand = _byte; m_command = byte;
} }
else else
{ {
switch (m_uCommand) switch (m_command)
{ {
case init: case init:
{ {
m_uAD16Register.U32 = 0x04120000; m_ad16_register.U32 = 0x04120000;
switch (m_uPosition) switch (m_position)
{ {
case 1: case 1:
_dbg_assert_(EXPANSIONINTERFACE, (_byte == 0x00)); _dbg_assert_(EXPANSIONINTERFACE, byte == 0x00);
break; // just skip break; // just skip
case 2: case 2:
_byte = m_uAD16Register.U8[0]; byte = m_ad16_register.U8[0];
break; break;
case 3: case 3:
_byte = m_uAD16Register.U8[1]; byte = m_ad16_register.U8[1];
break; break;
case 4: case 4:
_byte = m_uAD16Register.U8[2]; byte = m_ad16_register.U8[2];
break; break;
case 5: case 5:
_byte = m_uAD16Register.U8[3]; byte = m_ad16_register.U8[3];
break; break;
} }
} }
@ -57,19 +57,19 @@ void CEXIAD16::TransferByte(u8& _byte)
case write: case write:
{ {
switch (m_uPosition) switch (m_position)
{ {
case 1: case 1:
m_uAD16Register.U8[0] = _byte; m_ad16_register.U8[0] = byte;
break; break;
case 2: case 2:
m_uAD16Register.U8[1] = _byte; m_ad16_register.U8[1] = byte;
break; break;
case 3: case 3:
m_uAD16Register.U8[2] = _byte; m_ad16_register.U8[2] = byte;
break; break;
case 4: case 4:
m_uAD16Register.U8[3] = _byte; m_ad16_register.U8[3] = byte;
break; break;
} }
} }
@ -77,19 +77,19 @@ void CEXIAD16::TransferByte(u8& _byte)
case read: case read:
{ {
switch (m_uPosition) switch (m_position)
{ {
case 1: case 1:
_byte = m_uAD16Register.U8[0]; byte = m_ad16_register.U8[0];
break; break;
case 2: case 2:
_byte = m_uAD16Register.U8[1]; byte = m_ad16_register.U8[1];
break; break;
case 3: case 3:
_byte = m_uAD16Register.U8[2]; byte = m_ad16_register.U8[2];
break; break;
case 4: case 4:
_byte = m_uAD16Register.U8[3]; byte = m_ad16_register.U8[3];
break; break;
} }
} }
@ -97,12 +97,12 @@ void CEXIAD16::TransferByte(u8& _byte)
} }
} }
m_uPosition++; m_position++;
} }
void CEXIAD16::DoState(PointerWrap& p) void CEXIAD16::DoState(PointerWrap& p)
{ {
p.Do(m_uPosition); p.Do(m_position);
p.Do(m_uCommand); p.Do(m_command);
p.Do(m_uAD16Register); p.Do(m_ad16_register);
} }

View File

@ -12,7 +12,7 @@ class CEXIAD16 : public IEXIDevice
{ {
public: public:
CEXIAD16(); CEXIAD16();
void SetCS(int _iCS) override; void SetCS(int cs) override;
bool IsPresent() const override; bool IsPresent() const override;
void DoState(PointerWrap& p) override; void DoState(PointerWrap& p) override;
@ -24,16 +24,16 @@ private:
read = 0xa2 read = 0xa2
}; };
union UAD16Reg union AD16Reg
{ {
u32 U32 = 0; u32 U32 = 0;
u32 U8[4]; u32 U8[4];
}; };
// STATE_TO_SAVE // STATE_TO_SAVE
u32 m_uPosition = 0; u32 m_position = 0;
u32 m_uCommand = 0; u32 m_command = 0;
UAD16Reg m_uAD16Register; AD16Reg m_ad16_register;
void TransferByte(u8& _uByte) override; void TransferByte(u8& byte) override;
}; };