5 s826_diosaferead, 6 s826_diosafeenableswrite, 7 s826_diosafeenablesread – Sensoray 826 User Manual
Page 58: S826_diosaferead, S826_diosafeenableswrite, S826_diosafeenablesread
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).
8.3.5 S826_DioSafeRead
The S826_DioSafeRead function returns the contents of the DIO Safe registers.
int S826_DioSafeRead(
uint board, // board identifier
uint data[2] // pointer to data buffer
);
Parameters
board
826 board number. This must match the settings of the board's dip switches as described in section 2.2.
data
Pointer to a buffer (see Section 8.3) that will receive the Safe register states.
Return Values
If the function succeeds, the return value is zero.
If the function fails, the return value is an error code.
8.3.6 S826_DioSafeEnablesWrite
The S826_DioSafeEnablesWrite function programs the DIO Safe Enable registers.
int S826_DioSafeEnablesWrite(
uint board, // board identifier
uint enables[2] // pointer to safemode enables
);
Parameters
board
826 board number. This must match the settings of the board's dip switches as described in section 2.2.
enables
Pointer to array of values (see Section 8.3) to be programmed into the Safe Enable registers.
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).
8.3.7 S826_DioSafeEnablesRead
The S826_DioSafeEnablesRead function returns the contents of the DIO Safe Enable registers.
826 Instruction Manual
53
Digital I/O