Owner's manual

Half-size SBC HSB-CV1P
Appendix A Programming the Watchdog Timer A-5
A.2 F81866 Watchdog Timer Initial Program
Main(){
aaeonSuperIOOpen();
aaeonWd tSetCountMode(BOOLbMinute);//Setwdtcountmode
aaeonWdtSetTimeoutCount(BYTEtTimeout);//Setwdttimer
aaeonWd tSetEnable(BOOLbEnable);//Enablewdt
aaeonSuperIOClose();
}
VoidaaeonSuperIOOpen(){ //ConfigF81866Entrykey
aaeonioWritePortByte(F81866_INDEX,0x87);
aaeonioWritePortByte(F81866_INDEX,0x87);
}
VoidaaeonWdtSetCountMode(BOOLbMinute){
BYTEWDT_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);
}