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
Содержание ARK-5420 Series
Страница 8: ...ARK 5420 User Manual viii ...
Страница 12: ...ARK 5420 User Manual xii ...
Страница 18: ...ARK 5420 User Manual 6 ...
Страница 19: ...Chapter 2 2 Hardware installation Sections include Introduction Jumpers and Connectors I O Connectors ...
Страница 35: ...Chapter 4 4 BIOS Setting ...
Страница 64: ...ARK 5420 User Manual 52 ...
Страница 65: ...Chapter 6 6 GPIO Programming This chapter introduces GPIO pro gramming Guide ...
Страница 74: ...ARK 5420 User Manual 62 ...
Страница 75: ...Appendix A A Programming the Watchdog Timer ...
Страница 79: ...67 ARK 5420 User Manual Appendix A Programming the Watchdog Timer ...