Gx3788PioSetPortChannelDirection

Purpose

Sets the output state of a selected digital port.

Syntax

Gx3788PioSetPortChannelDirection (nHandle, nPort, nChannel, bValue, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle to a GX3788 board.
nPort
SHORT
Select the digital port to get:
0.      GX3788_PIO_PORT0: Digital Port 0.
1.      GX3788_PIO_PORT1: Digital Port 1.
2.    GX3788_PIO_PORT2: Digital Port 2.
nChannel
SHORT
Selects the channel within the selected port to set (0-31).
bValue
PBOOL
Sets the output state of a selected digital channel:
0.      FALSE: Digital low level.
1.    TRUE: Digital high level.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

Digital Port 0 contains the positive 32 channels of the 32 differential pairs.

Digital Port 1 contains the negative 32 channels of the 32 differential pairs.

Digital Port 2 contains the 32 single-ended channels.

Example

The following example sets the digital port 0, channel 15 direction to output, and returns the settings:

 

SHORT nStatus;

BOOL bDirection;

 

Gx3788PioSetPortChannelDirection (nHandle, GX3788_PIO_PORT0, 15, TRUE, &nStatus);

Gx3788PioGetPortChannelDirection (nHandle, GX3788_PIO_PORT0, 15, &bDirection, &nStatus);

 

See Also

Gx3788PioReadPort, Gx3788PioReadPortChannel, Gx3788PioResetPort, Gx3788PioResetPortChannel, Gx3788PioSetPort, Gx3788PioSetPortChannel, Gx3788PioGetPortChannelDirection, Gx3788PioSetPortDirection, GxFpgaGetErrorString