Gx3722SerialOutGetMode

Purpose

Returns the specified serial-out channel operation mode.

Syntax

Gx3722SerialOutGetMode (nHandle, nChannel, pnMode, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle to a GX3722 board.  
nChannel
SHORT
Channel to get, channels are 0-2:
0.      GX3722_SERIAL_PAL_CH0: Channel 0.
1.      GX3722_SERIAL_PAL_CH1: Channel 1.
2.    GX3722_SERIAL_PAL_CH2: Channel 2.  
pnMode
PSHORT
Returns the specified serial-out channel operation mode, operation mode can be:
0.      GX3722_SERIAL_MODE_PORT_IO: The channel is set to a static I/O.
1.    GX3722_SERIAL_MODE_TRANSMIT_DATA: The channel is set to a serial-out transmitting data.   
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

When any channel is set to GX3722_SERIAL_MODE_TRANSMIT_DATA mode, all four channels are set to output.

Channels 0-2 can be programmed to operate as serial-out transmitter or as static I/O, see Gx3722SerialOutSetMode() API for more details. When any of Channels 0-2 are set to Serial-out, all 4 channels direction is set to output.

See the Gx3722SerialOutGetStatus () API for complete example.

Example

The following example returns serial-out channel 0 operation mode:

 

SHORT nHandle, nStatus;

SHORT nMode;

 

Gx3722SerialOutGetMode (nHandle, GX3722_SERIAL_PAL_CH0, &nMode, &nStatus);

 

See Also

Gx3722SerialOutReset, Gx3722SerialOutSetArmState, Gx3722SerialOutSetBitRate, Gx3722SerialOutSetData, Gx3722SerialOutSetDataBitsPulseWidth, Gx3722SerialOutGetTriggerSource, Gx3722SerialOutSetMode, Gx3722SerialOutSetNumOfDataBits, Gx3722SerialOutSetShiftMode, Gx3722SerialOutSetTriggerDelay, Gx3722SerialOutTrig, GxFpgaGetErrorString