Use constants for CMOS port selection
All checks were successful
All checks were successful
This commit is contained in:
@@ -24,7 +24,7 @@ UCHAR
|
|||||||
HL::Firmware::ReadCmosRegister(IN UCHAR Register)
|
HL::Firmware::ReadCmosRegister(IN UCHAR Register)
|
||||||
{
|
{
|
||||||
/* Select the register (Setting the highest bit disables NMI) */
|
/* Select the register (Setting the highest bit disables NMI) */
|
||||||
HL::IoPort::WritePort8(CMOS_ADDRESS_PORT, Register | 0x80);
|
HL::IoPort::WritePort8(CMOS_SELECT_PORT, Register | CMOS_NMI_SELECT);
|
||||||
|
|
||||||
/* Read value from the data port */
|
/* Read value from the data port */
|
||||||
return HL::IoPort::ReadPort8(CMOS_DATA_PORT);
|
return HL::IoPort::ReadPort8(CMOS_DATA_PORT);
|
||||||
@@ -49,7 +49,7 @@ HL::Firmware::WriteCmosRegister(IN UCHAR Register,
|
|||||||
IN UCHAR Value)
|
IN UCHAR Value)
|
||||||
{
|
{
|
||||||
/* Select the register (Setting the highest bit disables NMI) */
|
/* Select the register (Setting the highest bit disables NMI) */
|
||||||
HL::IoPort::WritePort8(CMOS_ADDRESS_PORT, Register | 0x80);
|
HL::IoPort::WritePort8(CMOS_SELECT_PORT, Register | CMOS_NMI_SELECT);
|
||||||
|
|
||||||
/* Write the provided value to the data port */
|
/* Write the provided value to the data port */
|
||||||
HL::IoPort::WritePort8(CMOS_DATA_PORT, Value);
|
HL::IoPort::WritePort8(CMOS_DATA_PORT, Value);
|
||||||
|
|||||||
Reference in New Issue
Block a user