Writes whole data to a port.
Gx5732SetPort (nHandle, nPort, dwValue, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a GX5732 board. |
nPort |
SHORT |
Digital I/O port number:0. GX5732_PORT0: Port 0.1. GX5732_PORT1: Port 1.2. GX5732_PORT2: Port 2.3. GX5732_PORT3: Port 3.4. GX5732_PORT4: Port 4.5. GX5732_PORT5: Port 5.6. GX5732_PORT6: Port 6. |
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.
Use the Gx5732GetPort to read data from the port.
The following example writes 0xFF00FF to port 1:
Gx5732SetPort (nHandle, GX5732_PORT1, 0xFF00FF, &nStatus);
Gx5732GetPort, Gx5732SetPortBit, Gx5732SetPortByte, Gx5732SetPortWord, Gx5732SetPortDirection