User Manual

Embedded Controller TKS-G20-LN05 Rev.B
Appendix B DIO B-7
status
IO_Delay(1);
if ((Temp & 0x02) == 1)
//termination of command ?
{
return 0;
}
if ((Temp & 0x40) == 0)
//status OK ?
{
return 0;
}
if ((Temp & 0x04) == 1)
//device error
{
return -1;
}
}
return -1;
}
int SMBusCheckComplete(unsigned int SMBus_Base)
{
unsigned int result;
result = inportb(SMBus_Base+SMBUS_REG_STATUS);
if((result &
(SMBUS_STATUS_FAILED+SMBUS_STATUS_BUS_ERROR+SMBUS_S
TATUS_DEVICE_ERROR+SMBUS_STATUS_HOST_BUSY)) != 0)
return 0;
else