Gx6188PioSetOutputData

Purpose

Sets the value of the PIO’s output-enabled channels.

Syntax

Gx6188PioSetOutputData (nHandle, wOutputData, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle to a GX6188 board.
wOutputData
WORD
Bit field that represents the 14 output lines of the PIO.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

This function controls the output (driving) data of the 14-line PIO device.  If a PIO channel is set to output, the value programmed with this function will determine that channels logic level. Bit 0 of wOutputData controls the logic level of GPIO0, bit 13 controls GPIO13.  Bits 14 and 15 are not used.

Example

The following example sets all 14 IO lines to generate a logic HI:

 

Gx6188PioSetOutputEnable (nHandle, 0x3FFF &nStatus);

Gx6188PioSetOutputData (nHandle, 0x3FFF &nStatus);

 

See Also

Gx6188PioGetOutputData, Gx6188PioSetOutputEnable, Gx6188PioGetOutputEnable, GxSWGetErrorString