H a l f - s i z e S B C
A.2 F81866 Watchdog Timer Initial Program
Main
(){
aaeonSuperIOOpen();
aaeonWdtSetCountMode(BOOL bMinute); // Set wdt count mode
aaeonWdtSetTimeoutCount(BYTE tTimeout); // Set wdt timer
aaeonWdtSetEnable(BOOL bEnable); // Enable wdt
aaeonSuperIOClose();
}
Void aaeonSuperIOOpen(){ // Config F81866 Entry key
aaeonioWritePortByte(F81866_INDEX, 0x87);
aaeonioWritePortByte(F81866_INDEX, 0x87);
}
Void aaeonWdtSetCountMode(BOOL bMinute){
BYTE WDT_CONTROL = f81866ReadByte(F81866_WDT_CONTROL_REG);
if(bMinute)
f81866WriteByte(F81866_WDT_CONTROL_REG, WDT_CONTROL | 0x08);
else
f81866WriteByte(F81866_WDT_CONTROL_REG, WDT_CONTROL & 0xF7);
}
Appendix A Programming the Watchdog Timer A-5
H S B - C V 1 P