Gx3788PioSetPort

Purpose

Sets the output states of a selected digital port.

Syntax

Gx3788PioSetPort (nHandle, nPort, dwValue, 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.
dwValue
DWORD
Sets the output states of the selected digital port, each bit represents a channel within the port, bit 0, channel 1, when the bit is high the state will be high and 0 for low.
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 output states to 0xF, and returns the settings:

 

SHORT nStatus;

DWORD dwValue;

 

Gx3788PioSetPort (nHandle, GX3788_PIO_PORT0, 0xF, &nStatus);

Gx3788PioGetPort (nHandle, GX3788_PIO_PORT0, &dwValue, &nStatus);

 

 

See Also

Gx3788PioReadPort, Gx3788PioReadPortChannel, Gx3788PioResetPort, Gx3788PioResetPortChannel, Gx3788PioGetPort, Gx3788PioSetPortChannel, Gx3788PioSetPortChannelDirection, Gx3788PioSetPortDirection, GxFpgaGetErrorString