U2C_RESULT U2C_GetSingleIoDirection( HANDLE hDevice, ULONG IoNumber, BOOL* pbOutput );
The U2C_GetSingleIoDirection() function obtains input/output direction of the specified GPIO pin.
Handle to the U2C-12 device.
The number of the GPIO pin to obtain direction:
- Numbers 0..7 correspond to Port A pins 0..7
- Numbers 8..15 correspond to Port B pins 0..7
- Number 16..23 correspond to Port C pins 0..7
A pointer to the boolean to be filled with the direction of the GPIO pin:
- *pbOutput = TRUE indicates that the GPIO pin is configured for output
- *pbOutput = FALSE indicates that the GPIO pin is configured for input
The GPIO pin direction was successfully read.
U2C-12 device referenced by hDevice handle was not found.
IoNumber is out of range.