AAEON TKS-G20-LN05 Rev.B User Manual

Page 55

Advertising
background image

E m b e d d e d C o n t r o l l e r

T K S - G 2 0 - L N 0 5 R e v . 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

Advertising