Gx6188PioReadInput

Purpose

Reads sampled value from PIO input register.

Syntax

Gx6188PioReadInput (nHandle, pwInputData, pnStatus)

Parameters

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

Comments

This function reads the last sampled value from the input register.  If GPIO0 is configured as an input port, then this function will store the sampled value of GPIO0 in the least-significant bit (bit 0).

Example

The following example reads all 14 input lines from the PIO:

 

WORD wInputData;

Gx6188PioReadInput (nHandle, &wInputData &nStatus);

 

See Also

Gx6188PioSetOutputData, Gx6188PioGetOutputData, Gx6188PioSetOutputEnable, Gx6188PioGetOutputEnable, GxSWGetErrorString