Reads sampled value from PIO input register.
Gx6188PioReadInput (nHandle, pwInputData, pnStatus)
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. |
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).
The following example reads all 14 input lines from the PIO:
WORD wInputData;
Gx6188PioReadInput (nHandle, &wInputData &nStatus);
Gx6188PioSetOutputData, Gx6188PioGetOutputData, Gx6188PioSetOutputEnable, Gx6188PioGetOutputEnable, GxSWGetErrorString