/* Set the flow control scheme. 
Set the flow control scheme by enabling or disabling RTS and CTS lines. This will only have effect if the given UART supports the RTS and CTS lines. */
void uart_set_flow_control(uint32_t uart, enum uart_flowctl flow)
/* Set the flow control scheme. 
Set the flow control scheme by enabling or disabling RTS and CTS lines. This will only have effect if the given UART supports the RTS and CTS lines. */
void uart_set_flow_control(uint32_t uart, enum uart_flowctl flow)
{
	uint32_t reg32 = UART_CTL(uart);
	reg32 &= ~(UART_CTL_RTSEN | UART_CTL_CTSEN);
	if (flow == UART_FLOWCTL_RTS) {
		reg32 |= UART_CTL_RTSEN;
	} else if (flow == UART_FLOWCTL_CTS) {
		reg32 |= UART_CTL_CTSEN;
	} else if (flow == UART_FLOWCTL_RTS_CTS) {
		reg32 |= (UART_CTL_RTSEN | UART_CTL_CTSEN);
	}
	UART_CTL(uart) = reg32;
}