beautypg.com

8 s826_watchdogwaitcancel, S826_watchdogwaitcancel – Sensoray 826 User Manual

Page 70

background image

Remarks

This function can operate in either blocking or non-blocking mode. If tmax is zero, the function will return
immediately. If tmax is greater than zero, the calling thread will block until a watchdog event or tmax elapses. The
function will return zero if a watchdog timeout event occurred, or S826_ERR_NOTREADY if the watchdog has not
timed out.

When this function is blocking, it will return immediately with return code S826_ERR_CANCELLED if
S826_WatchdogWaitCancel is called by another thread, or with S826_ERR_BOARDCLOSED if S826_SystemClose
is called by another thread.

9.3.8 S826_WatchdogWaitCancel

The S826_WatchdogWaitCancel function cancels a blocking wait on watchdog Timer1.

int S826_WatchdogWaitCancel(
uint board // board identifier
);

Parameters

board

826 board number. This must match the settings of the board's dip switches as described in section 2.2.

Return Values

If the function succeeds, the return value is zero.

If the function fails, the return value is an error code.

Remarks

This function cancels blocking on the watchdog so that another thread, which is blocked by S826_WatchdogEventWait
while waiting for a watchdog timeout event, will return immediately with S826_ERR_CANCELLED.

826 Instruction Manual

65

Watchdog Timer