Gx3756PioSetAllChannels

Purpose

Sets the logic levels settings of all 56 digital I/O channels.

Syntax

Gx3756PioSetAllChannels (nHandle, dwChannels32To55, dwChannels0To31, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle to a GX3756 board.
dwChannels32To55
DWORD
Sets the logic levels settings of digital I/O channels 32 to 55.
dwChannels0To31
DWORD
Sets the logic levels settings of digital I/O channels 0 to 31.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

Each bit represents a channel’s digital level, bit zero represent channel 0 etc. A logic high (‘1’) means the channels is set to high, logic low (‘0’) means the channel is set to low. There are 56 Digital I/O channels, channel’s direction control is set in groups of 4 channels, e.g. channels 0-3, channels 4-7, etc. Any group of channels can be programmed to be all in or all out. If a group of channels is direction is set to input, the user can use specific channel is set Gx3756PioReadGroup(), Gx3756PioReadChannel(), and Gx3756PioReadAllChannels() APIs to read back the actual logic input levels.

Channels 0-3 (Group 0) can be programmed to operate as serial-out transmitter. See Gx3756SerialOutSetMode() API for more details.

Channels 3-7 (Group 1) can be programmed as an external trigger source to channels 0-3 (Group 0), when they are set to serial-out operation mode. See Gx3756SerialOutSetMode(), and Gx3756SerialOutGetTriggerSource() APIs for more details.

See the Gx3756PioSetGroupDirection() API for complete example.

Example

The following example sets the logic levels settings for all 56 I/O channels:

 

SHORT nHandle, nStatus;

 

Gx3756PioSetAllChannels (nHandle, 0x00123456, 0xABCDEF12, &nStatus);

 

See Also

Gx3756PioReadAllChannels, Gx3756PioReadGroup, Gx3756PioReadGroupChannel, Gx3756PioResetGroup, Gx3756PioGetAllChannels, Gx3756PioSetAllGroupsDirection, Gx3756PioSetGroup, Gx3756PioSetGroupChannel, Gx3756PioSetGroupDirection, GxFpgaGetErrorString