ARK-5420 User Manual
58
outportb(SMBU 3, offset);// Write register off-
set to SM 3
newiodelay();//delay
newiodelay();//delay
outportb(SMBU 2, 0x48);// Write SMBUS command to
SM 2. 0x48 means starting byte data transmission
newiodelay();//delay
newiodelay();//delay
for (i = 0; i <= 0x100; i++)
{
newiodelay();//longer delay
}
chk_smbus_ready();//Whether SMBUS is ready
return(inportb(SMBU 5));// Byte value read from
SM 5
}
//////////////////////////////////////////////////////////////
///////////////////////////////////////
void
smbus_write_byte(BYTE addr, BYTE offset, BYTE value)
// Write SMBUS Register byte value. Write one byte value each
time. addr is slave address (such as 0x40), and offset is
register offset.
{
int i;
outportb(SMBU 4, addr);// Write slave address to
SM 4 (When writing, slave address bit 0 should be set
as 0)
moredelay();//longer delay
moredelay();//longer delay
chk_smbus_ready();//Whether SMBUS is ready
outportb(SMBU 3, offset);// Write register off-
set to SM 3
moredelay();//longer delay
moredelay();//longer delay
outportb(SMBU 5, value);//Write data value to
SM 5
moredelay();//longer delay
moredelay();//longer delay
Summary of Contents for ARK-5420 Series
Page 8: ...ARK 5420 User Manual viii ...
Page 12: ...ARK 5420 User Manual xii ...
Page 18: ...ARK 5420 User Manual 6 ...
Page 35: ...Chapter 4 4 BIOS Setting ...
Page 64: ...ARK 5420 User Manual 52 ...
Page 65: ...Chapter 6 6 GPIO Programming This chapter introduces GPIO pro gramming Guide ...
Page 74: ...ARK 5420 User Manual 62 ...
Page 75: ...Appendix A A Programming the Watchdog Timer ...
Page 79: ...67 ARK 5420 User Manual Appendix A Programming the Watchdog Timer ...