GxFpgaPioGetChannelDirection

Applies to

GX3501, GX3509, GX3510

Purpose

Returns the specified PIO expansion board channel direction.

Syntax

GxFpgaPIOGetChannelDirection (nHandle ,nGroup, nChannel, pdwDirection, pnStatus)

Parameters

Name
Type
Comments
pnHandle
SHORT
Handle to a GX3500 board.
nGroup
SHORT
Group value is as follows:
0.   GXFPGA_PIO_GROUP_A.
1.   GXFPGA_PIO_GROUP_B.
2.   GXFPGA_PIO_GROUP_C.
3.   GXFPGA_PIO_GROUP_D.
nChannel
SHORT
Channel range is 0 to 19.
pnDirection
PSHORT
The channel direction can be as follows:
0.   GXFPGA_PIO_DIRECTION_INPUT.
1.   GXFPGA_PIO_DIRECTION_OUTPUT.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Example

The following example reads the direction from channel 4 of Flex I/O group A into the nDirection variable:

 

SHORT nDirection;

GxFpgaPIOGetChannelDirection (nHandle, GXFPGA_PIO_GROUP_A, 0x4, &nDirection, &nStatus);

 

See Also

GxFpgaPioSetChannelDirection, GxFpgaGetErrorString