AAEON AIS-E1-H61A User Manual
Page 109
A d v a n c e d S ys t e m
C o n t r o l l e r
A I S - E 1 - H 6 1 A
Appendix D Electrical Specifications for I/O Ports
D-8
************************************************************************************
VOID
SIOEnterMBPnPMode()
{
IOWriteByte(SIOIndex, 0x87);
IOWriteByte(SIOIndex, 0x87);
}
VOID
SIOExitMBPnPMode()
{
IOWriteByte(SIOIndex, 0xAA);
}
VOID
SIOSelectLDN(byte LDN)
{
IOWriteByte(SIOIndex, 0x07);
// SIO LDN Register Offset = 0x07
IOWriteByte(SIOData,
LDN
);
}
VOID
SIOBitSet(byte LDN, byte Register, byte BitNum, byte Value)
{
Byte TmpValue;
SIOEnterMBPnPMode();
SIOSelectLDN(byte
LDN
);
IOWriteByte(SIOIndex, Register);
TmpValue = IOReadByte(SIOData);
TmpValue &= ~(1 << BitNum);
TmpValue |= (Value << BitNum);
IOWriteByte(SIOData, TmpValue);
SIOExitMBPnPMode();
}
VOID
SIOByteSet(byte LDN, byte Register, byte Value)
{
SIOEnterMBPnPMode();
SIOSelectLDN(LDN);
IOWriteByte(SIOIndex, Register);
IOWriteByte(SIOData,
Value
);
SIOExitMBPnPMode();
}
************************************************************************************