beautypg.com

ADLINK NuPRO-E340 User Manual

Page 90

background image

76

Watchdog Timer

registerValue = inportb(IT8783_ioPort+1);

registerValue |= 0x80;

tempCount = count_value;

if(tempCount != 0)

{

printf("WDT timeout in %d seconds.\n",

tempCount);

registerValue |= 0x40; //Enable WDT output

through KBRST

}

else

{

printf("WDT is Disabled.\n");

registerValue &= 0xbf; //Disable WDT output

through KBRST

}

outportb(IT8783_ioPort+1, registerValue); // set

WDT count is second

}

outportb(IT8783_ioPort, 0x71);

registerValue = inportb(IT8783_ioPort + 1);

registerValue |= 0x60; // set Mouse & Keyboard

interrupt Enable

outportb(IT8783_ioPort+1, registerValue);

outportb(IT8783_ioPort, 0x73);

outportb(IT8783_ioPort+1, tempCount); // set WDT count

LSB

}