U2C_RESULT U2C_IoRead (
HANDLE hDevice,
ULONG* pValue
);
The U2C_IoRead function obtains the value of the GPIO port pins.
- Parameters:
-
| hDevice | Handle to the U2C-12 device. |
| pValue | A pointer to unsigned long to be filled with the value of the GPIO pins. pValue is treated as unsigned long 0xXXCCBBAA, where CC, BB and AA correspond to the C, B and A port pins:
- AA bits 7..0 correspond to Port A pins 7..0
- BB bits 7..0 correspond to Port B pins 7..0
- CC bits 7..0 correspond to Port C pins 7..0
- XX bits 7..0 reserved
|
- Return values:
-
| U2C_SUCCESS | The GPIO pins state was successfully read. |
| U2C_HARDWARE_NOT_FOUND | U2C-12 device referenced by hDevice handle was not found. |
|