System Installation
RUBY-D716VG2AR User’s Manual
3-11
EC_WriteByte(EC_1,
addr_HighByte);
EC_WriteByte(EC_IO_BASE,
0x10);
EC_WriteByte(EC_1,
addr_LowByte);
EC_WriteByte(EC_IO_BASE,
0x12);
return
EC_ReadByte(EC_1);
}
void ec_wdt_trigger ()
{
EC_SetRamByte (0x308, 0x05); /* WDT Counter */
EC_SetRamByte (0x306, 0x01); /* WDTCFG[1:0]=01 */
}
int main(void)
{
int i;
ec_wdt_trigger
();
for (i = 0; i < 5; i++)
{
printf ("Reset counter ...................%d\n", 5 - i);
delay
(1000);
}
return
0;
}