AAEON TKS-G21-QM77B User Manual
Page 134
Advertising
E m b e d d e d B o x
T K S - G 2 1 - Q M 7 7 B
AppendixE Digital I/O Ports
E - 8
Byte TmpValue;
SIOEnterMBPnPMode();
SIOSelectLDN(DIOLDN);
If (PinBit < Pin4Bit) {
IOWriteByte(SIOIndex, DirReg1);
TmpValue = IOReadByte(SIOData);
TmpValue &= (1 << PinBit);
TmpValue |= (Mode << PinBit);
IOWriteByte(SIOData, DirReg1);
} else
{
IOWriteByte(SIOIndex, DirReg2);
TmpValue = IOReadByte(SIOData);
TmpValue &= ~(1 << (PinBit – Pin4Bit));
TmpValue |= (Mode << (PinBit – Pin4Bit));
IOWriteByte(SIOData, DirReg2);
}
SIOExitMBPnPMode();
}
**************************************************************************
Advertising