71
ITA-5831 User Manual
Chapter 6
G
PIO Programming
Guide
/////////////////////////////////////////////////////////////////////
int
chk_smbus_ready()
// To decide whether SMBUS is ready or has completed the action, you
should wait for a long time to check whether SMBUS has successfully
transmitted the command.
Since error may rarely occurs, BIOS code does not make judgement on
the return value of this function in read and write of SUMBUS byte.
{
int i, result = 1;
BYTE data;
for (i = 0; i <= 0x800; i++)
{
//SM 0 is the value of SMBUS status
data = inportb(SMBUS_PORT);//Read SMBUS status value once
data = check_data(SMBUS_PORT);//Read SMBUS status value
several time
outportb(SMBUS_PORT, data); // Write back SMBUS status
value which will clear status value (Write 1 to the corresponding bit
means clearing status
if (data & 0x02)
{
// If bit 1 is set (which means the command is
completed), SMBUS is ready
result = 0;//SMBUS ready
break;
}
if (!(data & 0xBF))
{
// If all bits are 0 except bit 2 (which means error
occurs on SMBUS), SMBUS is ready
result = 0;
//SMBUS ready
break;
}
if (data & 0x04)
{
// If bit 2 is set (which means error occurs on
SMBUS), error occurs on SMBUS which is rarely the case
result = 1;
//SMBUS error
break;
}
}
return result;
}
Summary of Contents for ITA-5831 Series
Page 10: ...ITA 5831 User Manual x ...
Page 14: ...ITA 5831 User Manual 4 1 5 System Diagram Figure 1 1 ITA 5831 System Diagram ...
Page 16: ...ITA 5831 User Manual 6 ...
Page 17: ...Chapter 2 2 H W Installation Introduction Jumpers and Connectors I O Connectors ...
Page 26: ...ITA 5831 User Manual 16 ...
Page 29: ...19 ITA 5831 User Manual Chapter 3 System Setup Figure 3 2 Mini PCIe Installation ...
Page 34: ...ITA 5831 User Manual 24 Figure 3 10 Battery Module ITA BA61 00A1E ...
Page 37: ...Chapter 4 4 BIOS Settings ...
Page 64: ...ITA 5831 User Manual 54 ...
Page 68: ...ITA 5831 User Manual 58 ...
Page 69: ...59 ITA 5831 User Manual Chapter 5 Driver Installation ...
Page 72: ...ITA 5831 User Manual 62 ...
Page 73: ...Chapter 6 6 GPIO Programming Guide ...
Page 84: ...ITA 5831 User Manual 74 ...
Page 85: ...Appendix A A Watchdog Timer ...
Page 90: ...ITA 5831 User Manual 80 ...
Page 91: ...Appendix B B BSMI RoHS Declaration ...
Page 93: ...Appendix C C Chinese Language Safety Instructions and Battery Information ...