usart_os_flow_control_status

Retrieve the state of flow control pins.

int32_t usart_os_flow_control_status(
    const struct usart_os_descriptor *const descr,
    union usart_flow_control_state *const state
)

This function retrieves the flow control pins if the flow control is enabled. The function can return UASRT_OS_FLOW_CONTROL_STATE_UNAVAILABLE in case if the flow control is done by the hardware and pins state cannot be read out.

Parameters

descr

Type: const struct usart_os_descriptor Struct *const

A USART descriptor which is used to communicate via USART

state

Type: union usart_flow_control_state *const

The state of flow control pins

Returns

Type: int32_t

The status of flow control state reading.

-1

Passed parameters were invalid or the interface is not initialized

0

The flow control state is retrieved successfully