User Manual

Embedded Box TKS-G50-QM77
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();
}
**************************************************************************