MT_SetWDT

■Description

Initialize and set the watchdog timer.

■Synopsis

int MT_SetWDT(int fd,PWDTVAL pwdt)

■Argument

int fd
  Please specify handle acquired by MT_Open function.

PWDTVAL pwdt
  Specify a pointer to a structure that stores WDT setting information.

    typedef struct _WDTVAL {
      unsigned char ucTimeOut;
      long lTickCount
    } WDTVAL, *PWDTVAL;

Member variable Setting information
ucTimeOut
(Timeout value)
Sets the time-up time of the watchdog timer.
The setting range is from 1 to 255 (seconds).
lTickCount
(Tick count value)
Set the tick count value.
The MT_TickWDT function does not clear the WDT timer more than the number set here. Therefore, if the number of times the timer is cleared reaches the tick count value and the watchdog timer is not stopped before the timeout value elapses, the system is reset. When the timer clear count reaches this set value, the lTickCount value will be 0, so you will need to set it again when using this function again. If this value is set to 0, it will be invalid and the system reset will not be performed according to the timer clear count.

■RETURN VALUE

If the function succeeds, NO_ERROR is returned.
If the function fails, a code other than NO_ERROR is returned.
The other errors : Error code details



Function List