Gx5731SetPort (nHandle, nPort, dwValue, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a GX5731 board. |
nPort |
SHORT |
Specified Module's port number:0. GX5731_PORT0: Module port 01. GX5731_PORT1: Module port 12. GX5731_PORT2: Module port 2. |
dwValue |
DWORD |
Port value to set: 0 to 4,294,967,295 (0-0xFFFFFFFF), where each bit represents a channel. Bit 0 for channel 0 and bit 31 for channel 31. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
Only bytes that are set to output direction will be written.
The following example writes 0xFF00FF to port 1:
Gx5731GetPort (nHandle, 1, 0xFF00FF, &nStatus);
Gx5731GetPort, Gx5731SetPortBit, Gx5731SetPortByte, Gx5731SetPortWord, Gx5731SetPortDirection