beautypg.com

4 s826_watchdogenableread, 5 s826_watchdogstatusread, S826_watchdogenableread – Sensoray 826 User Manual

Page 68: S826_watchdogstatusread

background image

Parameters

board

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

enable

Set to '1' to enable, or '0' to disable the watchdog. The watchdog is disabled by default upon board reset.

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 should only be called when the SWE bit is set (see S826_SafeWrenWrite). The function will fail without
notification (return S826_ERR_OK) if SWE=0 (see Section 10.1.1).

9.3.4 S826_WatchdogEnableRead

The S826_WatchdogEnableRead function returns the enable status of the watchdog system.

int S826_WatchdogEnableRead(
uint board, // board identifier
uint *enable // enable status
);

Parameters

board

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

enable

Buffer that will receive the watchdog system enable status: '1' = enabled, '0' = disabled.

Return Values

If the function succeeds, the return value is zero.

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

9.3.5 S826_WatchdogStatusRead

The S826_WatchdogStatusRead function reads the watchdog timeout status.

int S826_WatchdogStatusRead(
uint board, // board identifier
uint *status // watchdog status
);

Parameters

board

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

status

Pointer to a quadlet buffer that will receive the watchdog status. Each status bit indicates the timeout status of one
watchdog timer stage ('1' = timed out):

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10

9

8

7

6

5

4

3

2

1

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

TO2 TO1 TO0

826 Instruction Manual

63

Watchdog Timer