Nuvo-2000+ Series User’s Manual
Copyright © 2013 Neousys Technology Inc. All Right Reserved.
Page 72 of 78
4. When you programming your WDT or DIO program, the related files are located in
Header
file:
\Include
Lib
file:
\Lib
Function
Reference:
\Manual
Sample
Code:
\Sample
A.2 Function Reference
InitWDT
Description
Initialize the WDT function. You should always invoke InitWDT() before set or start
watch-dog timer.
Parameter
None
Return Value
Always returns TRUE
Usage
BOOL bRet = InitWDT()
SetWDT
Description
Set timeout value and unit for watch-dog timer. When InitWDT() is invoked, a default
timeout value of 255 seconds is assigned.
Parameter
tick
WORD value (1 ~ 65535) to indicate timeout ticks.
unit
BYTE value (0 or 1) to indicate unit of timeout ticks.
0 : unit is minute
1: unit is second
Return Value
If value of unit is correct (0 or 1), this function returns TRUE, otherwise FALSE.
Usage
WORD tick=255;
BYTE unit=1; //unit is second.
BOOL bRet = SetWDT(tick, unit); //timeout value is 255 seconds