xpci3xxx  1.00.00
Macros
Digital outputs

Macros

#define CMD_xpci3xxx_SetDigitalOutputMemoryOn   _IOR(xpci3xxx_MAGIC, 72,long)
 Actives digital output memory on. More...
 
#define CMD_xpci3xxx_SetDigitalOutputMemoryOff   _IOR(xpci3xxx_MAGIC, 73,long)
 Inactives the digital output memory. More...
 
#define CMD_xpci3xxx_Set32DigitalOutputsOn   _IOR(xpci3xxx_MAGIC, 70,long)
 Set digital outputs of the board. More...
 
#define CMD_xpci3xxx_Set32DigitalOutputsOff   _IOR(xpci3xxx_MAGIC, 71,long)
 Set digital outputs from the board off. More...
 
#define CMD_xpci3xxx_Get32DigitalOutputStatus   _IOR(xpci3xxx_MAGIC, 74,long)
 Get the digital output current status. More...
 

Detailed Description

Macro Definition Documentation

◆ CMD_xpci3xxx_Get32DigitalOutputStatus

#define CMD_xpci3xxx_Get32DigitalOutputStatus   _IOR(xpci3xxx_MAGIC, 74,long)

Get the digital output current status.

This command allows to retrieve the current state of the outputs as known by the board. Each bit set means the corresponding channel is on.

Parameters
[out]uint32_t*arg Digital output status

This value encodes the TTL and the 24V outputs (if the board support them) The values for the TTL are encoded in the 4 higher bytes (mask 0xFFFF0000) The values for the 24V are encoded in the lower byte (mask 0x0000000F)

Return values
0OK
1Internal error

Definition at line 1082 of file xpci3xxx.h.

◆ CMD_xpci3xxx_Set32DigitalOutputsOff

#define CMD_xpci3xxx_Set32DigitalOutputsOff   _IOR(xpci3xxx_MAGIC, 71,long)

Set digital outputs from the board off.

Resetting an output means setting this output to "Low". This command can only be used when the digital output memory is active.

Parameters
[in]uint32_t*arg Bit mask

Bits that are set in the mask are cleared and the corresponding channels set to off. Bits not set are ignored, and the original value not changed.

The parameter sets the TTL and the 24V outputs (if the board support them)

  • The values for the TTL are encoded in the 4 higher bytes (mask 0xFFFF0000)
  • The values for the 24V are encoded in the lower byte (mask 0x0000000F)
Return values
0: OK
1: Internal error
2: Digital output memory not active
Note
if digital output memory is not active, you want to use CMD_xpci3xxx_Set32DigitalOutputsOn to set the output state.

Definition at line 1066 of file xpci3xxx.h.

◆ CMD_xpci3xxx_Set32DigitalOutputsOn

#define CMD_xpci3xxx_Set32DigitalOutputsOn   _IOR(xpci3xxx_MAGIC, 70,long)

Set digital outputs of the board.

Sets one or several outputs of a port. Setting one output means setting the output to "High".

If you have activated the digital output memory, the selected outputs channels are set to "1". The other channels hold their state.

If the digital output memory is not active, the selected outputs are set to "1". The other channels are reset to "0". This correspond to directly writing the output state.

Parameters
[in]uint32_t*arg Digital output value

The parameter sets the TTL and the 24V outputs (if the board support them)

  • The values for the TTL are encoded in the 4 higher bytes (mask 0xFFFF0000)
  • The values for the 24V are encoded in the lower byte (mask 0x0000000F)
Return values
0: OK
1: Internal error

Definition at line 1042 of file xpci3xxx.h.

◆ CMD_xpci3xxx_SetDigitalOutputMemoryOff

#define CMD_xpci3xxx_SetDigitalOutputMemoryOff   _IOR(xpci3xxx_MAGIC, 73,long)

Inactives the digital output memory.

This command modifies the behavior of the commands Set32DigitalOutputsOn and Set32DigitalOutputsOff.

Parameters
NULL(ignored)
Return values
0: OK
1: Internal error

Definition at line 1020 of file xpci3xxx.h.

◆ CMD_xpci3xxx_SetDigitalOutputMemoryOn

#define CMD_xpci3xxx_SetDigitalOutputMemoryOn   _IOR(xpci3xxx_MAGIC, 72,long)

Actives digital output memory on.

This command modifies the behavior of the commands Set32DigitalOutputsOn and Set32DigitalOutputsOff.

Parameters
NULL(ignored)
Return values
0: OK
1: Internal error

Definition at line 1008 of file xpci3xxx.h.