AAEON TKS-G21-QM77B User Manual
Page 132
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 - 6
//
InputStatus :
//
0: Digital I/O Pin level is low
//
1: Digital I/O Pin level is High
PinStatus = AaeonReadPinStatus(
Pin3Bit
);
// Procedure : AaeonSetOutputLevel
// Input :
//
Example, Set Digital I/O Pin 2 to high level
AaeonSetOutputLevel(
Pin2Bit, PinHigh
);
}
**************************************************************************
**************************************************************************
Boolean
AaeonReadPinStatus(byte PinBit)
{
Boolean PinStatus ;
If (PinBit < Pin4Bit) {
PinStatus = IoBitRead(
StatusReg1, PinBit
);
} else
{
PinStatus = IoBitRead(
StatusReg2, PinBit - PinBit4
);
}
Return PinStatus ;
}
VOID
AaeonSetOutputLevel(byte PinBit, byte Value)
{
ConfigDioMode(
PinBit, OutputPin
);
If (PinBit < Pin4Bit) {
IoBitSet (
StatusReg1, PinBit, Value
);
} else
{
IoBitSet (
StatusReg1, PinBit - PinBit4, Value
);
}
}
********************************************************************************
********************************************************************************VOI
D
SIOEnterMBPnPMode()
{
IOWriteByte(SIOIndex, 0x87);