beautypg.com

ADLINK MXC-6300 Series User Manual

Page 104

background image

92

Watchdog Timer (WDT) Function Library

unit. ResetWDT or StopWDT should be called before the expi-
ration of watchdog timer, or the system will reset.

Syntax

C/C++

BOOL SetWDT(BYTE tick, BYTE unit)

Parameters

tick

Specify the number of ticks for watchdog timer. A valid value
is 1 - 255.

unit

Specifies the timeout ticks of the watchdog timer.

Return codes

TRUE

if timeout value of watchdog timer is successfully set.

FALSE

if timeout value of watchdog timer is failed to set.

StartWDT

Start the watchdog timer function. Once the StartWDT is
invoked, the watchdog timer starts. ResetWDT or StopWDT
should be called before the expiration of watchdog timer, or the
system will reset.

Syntax

C/C++

BOOL StartWDT()

Parameters

None

Value

Description

0

The unit for one tick is one second. For example, when one
tick is specified as 100 and the unit as 0, the timeout value is
100 seconds.

1

The unit for one tick is one minute. For example, whenone
tick is specified as 100 and the unit as 1, the timeout value is
100 minutes.