Trek -725 Automobile Alarm User Manual


 
69 Chapter 4
4.9.5 Watchdog API
If you are developing an eVC project, you can call these functions to con-
trol the watchdog timer. The normal procedure is call AdvLibWDSetCon-
fig() to set the time interval, then the watchdog timer will be enabled.
After setting and enabling the watchdog timer, you must trigger (ping) the
watchdog timer within the time interval you set, or the system will reboot.
Finally, you could call AdvLibWDDisable() to stop the watchdog func-
tion.
AdvLibWDSetConfig
This API call sets the configuration of the watchdog driver.
* BOOL AdvLibWDSetConfig(DWORD delay, int timeout)
+ Parameters
- delay
[in] An initial delay in milliseconds before first timeout period.
- timeout
[in] Watchdog timeout in seconds. The range is set from 0 to 60.
+ Return Value
- TRUE (nonzero) on success.
FALSE (zero) on failure.
+ Remarks
This function enables and activates the watchdog timer with the given
parameters. After the watchdog timer is activated, the application should
regularly call AdvLibWDTrigger() within the specified timeout in milli-
seconds.
NOTE: If you set Parameter timeout to 0, the watchdog will reboot sys-
tem immediately.