U2C_RESULT U2C_IoWrite( HANDLE hDevice, ULONG Value, ULONG Mask );
The U2C_IoWrite() sets the output value of the GPIO port pins. Pins have to be configured as output using the U2C_SetIoDirection() function first.
Handle to the U2C-12 device.
An unsigned long value specifying the value to be set to the GPIO pins. Value 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
An unsigned long value specifying the data mask to use when modifying the GPIO pins output value. The mask value allows modification of the desired pins only, leaving rest of the pins unchanged. The bit mapping for Mask parameter is exactly the same as for Value parameter. Only value of the pins with mask bit set to 1 will be changed.
The GPIO pins output value was successfully modified.
U2C-12 device referenced by hDevice handle was not found.