Reads a port byte value.
Gx5733GetPortByte (nHandle, nPort, nByte, pucValue, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a GX5733 board. |
nPort |
SHORT |
Digital I/O port numbers are as follow:
|
nByte |
SHORT |
Port byte number: 0-3, 0 for the port low order byte and 3 for the high order byte. |
pucValue |
PBYTE |
Returned value 0-255. Each bit represents the specific channel state bit 0 for lowest channel number. |
pnStatus |
LPSHORT |
Returned status: 0 on success, negative number on failure. |
Use the Gx5733SetPortByte to write data to the port bit when in Output direction.
The following example reads port 1, byte 2 value:
SHORT nStatus;
BYTE ucValue;
Gx5733GetPortByte (nHandle, 1, 2, &ucValue, &nStatus);
Gx5733SetPortByte, Gx5733GetPortBit, Gx5733GetPortWord, Gx5733GetPort