AAEON EMB-A70M User Manual
Page 85
M i n i - I T X
E M B - A 7 0 M
Appendix D Electrical Specifications for I/O Ports
D-6
************************************************************************************
Boolean
AaeonReadPinStatus(byte Register, byte BitNum)
{
Boolean PinStatus ;
PinStatus = DIOBitRead(Register, BitNum);
Return PinStatus ;
}
VOID
AaeonSetOutputLevel(byte Register, byte BitNum, byte Value)
{
DIOBitSet(Register, BitNum, Value);
}
Boolean
DIOBitRead(byte Register, byte BitNum)
{
Byte TmpValue;
TmpValue = IOReadByte(Register);
TmpValue &= (1 << BitNum);
If(TmpValue == 0)
Return 0;
Return 1;
}
VOID
DIOBitSet(byte Register, byte BitNum, byte Value)
{
Byte TmpValue;
TmpValue = IOReadByte(Register);
TmpValue &= ~(1 << BitNum);
TmpValue |= (Value << BitNum);
IOWriteByte(Register, TmpValue);
}
************************************************************************************