************************************************************************************
// Procedure : AaeonWDTEnable
VOID A aeonWDTEnable (){
WDTEnableDisable(Enab leLDN, EnableReg, EnableBit, 1);
}
// Procedure : AaeonWDTConfig
VOID A aeonWDTConfig (){
// Disable WDT counting
WDTEnableDisable(Enab leLDN, EnableReg, EnableBit, 0);
// Clear Watchdog Timeout Status
WDTClearTimeoutStatus();
// WDT relative parameter setting
WDTParameterSetting();
}
VOID W DTEnableDisable(byte LDN, byte Register, byte BitNum, byte Value) {
SIOBitSet(LDN, Register, BitNum, Value);
}
VOID W DTParameterSetting(){
// Watchdog Timer counter setting
SIOByteSet(TimerLDN, TimerReg, TimerVal);
// WDT counting unit setting
SIOBitSet(U nitLDN, UnitReg, U nitBit, U nitVal);
// WDT output mode setting, level / pulse
SIOBitSet(Mo deLDN, ModeReg, ModeBit, ModeVal);
// Watchdog timeout output via WDTRST#
SIOBitSet(W DTRstLDN, WDTRstReg, W DTRstBit, WDTRstVal);
}
VOID W DTClearTimeoutStatus(){
SIOBitSet(St atusLDN, StatusReg, StatusBit, 1);
}
************************************************************************************
Appendix A – Watchdog Timer Programming
69