GxFpgaPioSetChannel

Applies to

GX3501, GX3509, GX3510, GX3540

Purpose

Sets the specified PIO expansion board channel value.

Syntax

GxFpgaPioSetChannel (nHandle ,nGroup, nChannel, nData, pnStatus)

Parameters

Name
Type
Comments
nHandle
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.
nData
SHORT
Channel value:
0.   Logic low.
1.   Logic high.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

This function will return the logic level of all the channels in the specified group.  When programming the GX3540, this function is limited to setting values to GXFPGA_PIO_GROUP_D.  Attempting to set values to any other group will result in an error.

Example

The following example sets the logic level of channel 4 of Flex I/O group A to logic high:

 

GxFpgaPioGetChannel (nHandle, GXFPGA_PIO_GROUP_A, 0x4, 0x1, &nStatus);

 

See Also

GxFpgaPioGetChannel, GxFpgaPioSetChannelDirection, GxFpgaGetErrorString