I n d u s t r i a l M o t h e r b o a r d
I M B A - Q 7 7
Appendix E Digital Input & Output
E-7
************************************************************************************
// Procedure : AaeonDigitalInput
boolean AaeonDigitalInput(int byte LDN, int byte RegNum, int byte
BitNum){
int byte ByteTempValue0 = 0;
// Enter SIO MB PnP mode
outportb (SIOIndex, 0x87);
outportb (SIOIndex, 0x87);
// Select Logic Device Number Register
outportb (SIOIndex, 0x07); // SIO LDN Register Offset = 0x07
outportb (SIOData, LDN);
// Select register offset, and read the register value
outportb (SIOIndex, RegNum);
ByteTempValue0 = inportb (SIOData);
// Exit SIO MB PnP mode
outportb (SIOIndex, 0xAA);
ByteTempValue0 &= (1 << BitNum);
if(ByteTempValue0)
{ return 1; }
else
{ return 0; }
}
************************************************************************************
All manuals and user guides at all-guides.com