Setwdt – ADLINK iSeries Monitor 18/21 User Manual

Page 58

Advertising
background image

46

Watchdog Timer (WDT) & DI/O Function Libraries

SetWDT

Sets the timeout value of the watchdog timer. There are two
parameters for this function to indicate the timeout ticks and
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

Specify 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

Starts 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++

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.

Advertising