Advantech ITA-1611 Series User Manual page 64

Fanless embedded celeron dual core compact industrial computer
Table of Contents

Advertisement

}
if (data & 0x04)
{
//If bit 2 is set to 1 (this means SMBUS error), then error has
occurred in SMBUS. This rarely happens
result =
break;
}
}
returnresult;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
/
BYTEcheck_data(WORD addr)
{
int i;
BYTE data;
for(i = 0; i <= 6; i++)
{
data = inportb(addr);
if (data != 0)
break;
}
returndata;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
/
voidnewiodelay()
//shot time delay
{
outportb(0xeb,
Writing value to this port can cause time delay. The user can also use other
methods instead
}
////////////////////////////////////////////////////////////////////////////////////////////////////
/
voidmoredelay()
//long time delay
{
int i;
for (i = 0; i < 20; i++)
{
outportb(0xeb,
Writing value to this port can cause time delay. The user can also use other
methods instead
}
}
***********************************************************************
*
GPIO simulation code
ITA-1611 User Manual
1;//SMBUS error
0);//IO port 0xeb is not occupied by any device actually.
0);//IO port 0xeb is not occupied by any device actually.
54

Advertisement

Table of Contents
loading

Table of Contents