System Installation
WADE-8079 User’s Manual
3-4
outportb (EC_DATA, data);
}
static unsigned char Read_EC (unsigned char address)
{
unsigned char data;
IBF_Check
();
outportb (EC_CMD, EC_CMD_READ);
IBF_Check
();
outportb (EC_DATA, address);
OBF_Check();
data = inportb (EC_DATA);
return
data;
}
void EC_WDT_Trigger ()
{
/* WDT Counter */
Write_EC (WDT_SEC, 0x05);
/* if use minute mode */
/* Write_EC (WDT_MIN, 0x05); */
/* 0x01 is second mode */
/* 0x03 is minute mode */
Write_EC (WDT_MODE, 0x01);
}
//Write_EC ((b->wdt.ec.count_m_addr & 0xFF), b->wdt.ec.timeout);
//Write_EC ((b->wdt.ec.cfg_addr & 0xFF), 0x03); //WDTCFG[1:0]=11
int main ()
{
int
i;
EC_WDT_Trigger
();
for (i = 0; i < 5; i++)
{
printf ("Reset counter ...................%d\n", 5 - i);
delay
(1000);
}
return
0;
}