English
Language : 

AN433 Datasheet, PDF (18/54 Pages) Silicon Laboratories – HID-TO-UART API SPECIFICATION
AN433
2.25. HidUart_ReadLatch
Description: Gets the current port latch value from the device.
Prototype:
HID_UART_STATUS HidUart_ReadLatch (HID_UART_DEVICE device, WORD*
latchValue)
Parameters: 1. device—Device object pointer as returned by HidUart_Open().
2. latchValue—Returns the port latch value (Logic High = 1, Logic Low = 0). If a pin is configured
as a GPIO input or flow control pin that is an input, then the corresponding bit represents the
input value. If a pin is configured as a GPIO output pin or a flow control pin that is an output,
then the corresponding bit represents the logic level driven on the pin.
Return Value: HID_UART_STATUS = HID_UART_SUCCESS
HID_UART_INVALID_DEVICE_OBJECT
HID_UART_INVALID_PARAMETER
HID_UART_DEVICE_IO_FAILED
HID_UART_DEVICE_NOT_SUPPORTED
Remarks:
See "6. Port Latch Pin Definition" on page 46 for more information on configuring GPIO and flow
control pins. Bits 9 and 15 of latchValue are ignored.
2.26. HidUart_WriteLatch
Description: Sets the current port latch value to the device.
Prototype:
HID_UART_STATUS HidUart_WriteLatch (HID_UART_DEVICE device, WORD
latchValue, WORD latchMask)
Parameters: 1. device—Device object pointer as returned by HidUart_Open().
2. latchValue—Value to write to the port latch (Logic High = 1, Logic Low = 0). This function is
used to set the values for GPIO pins or flow control pins that are configured as outputs. This
function will not affect any pins that are not configured as outputs.
3. latchMask—Determines which pins to change (Change = 1, Leave = 0).
Return Value: HID_UART_STATUS = HID_UART_SUCCESS
HID_UART_INVALID_DEVICE_OBJECT
HID_UART_DEVICE_IO_FAILED
HID_UART_DEVICE_NOT_SUPPORTED
Remarks:
See "6. Port Latch Pin Definition" on page 46 for more information on configuring GPIO and flow
control pins. Bits 9 and 15 or latchValue and latchMask are ignored. Pins TX, RX, Suspend, and /
Suspend cannot be written to using this function.
18
Rev. 0.5