void SelectDevice(unsigned char device)
{
outportb(IO_INDEX_PORT, DEVICE_REGISTER); outportb(IO_DATA_PORT, device);
}
unsigned char ReadAData(short int reg)
{
outportb(IO_INDEX_PORT, reg); return (inportb(IO_DATA_PORT));
}
void WriteAData(unsigned char reg, unsigned char data)
{
outportb(IO_INDEX_PORT, reg); outportb(IO_DATA_PORT, data);
}
void SetWatchDogTime(unsigned char time_val)
{
EnterConfigMode();
SelectDevice(8); //Set Register F2
//Set
//set counter counts in second (or minute)
//Register F4 Bit 6 = 0/1 (minutes/seconds)
//For w83977EF only
WriteAData(0xF4, 0x40); ExitConfigMode();
}
100