AAEON TKS-G50-QM77 User Manual

Page 117

Advertising
background image

E m b e d d e d B o x

T K S - G 5 0 - Q M 7 7

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