Gx5731SetPortBit (nHandle, nPort, nBit, ucValue, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a GX5731 board. |
nPort |
SHORT |
Digital I/O port number: 0-6. |
nBit |
SHORT |
Port channel number: 0 to 31. |
ucValue |
BYTE |
Channel value: 0 for low state and 1 for hi state. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
Only bit that reside in a group set to output direction will be written.
Use the Gx5731GetPortBit to read data from a port bit.
The following example set port 1, bit 30 value to hi state:
Gx5731GetPort (nHandle, 1, 30, 1, &nStatus);
Gx5731GetPortBit, Gx5731SetPortByte, Gx5731SetPortWord, Gx5731SetPort