/* Select GPIO pins to be used by this peripheral. 
This needs to be configured while UART peripheral is disabled. */
void uart_set_pins(uint32_t uart, uint32_t rx, uint32_t tx, uint32_t cts, uint32_t rts)
/* Select GPIO pins to be used by this peripheral. 
This needs to be configured while UART peripheral is disabled. */
void uart_set_pins(uint32_t uart, uint32_t rx, uint32_t tx, uint32_t cts, uint32_t rts)
{
	if (rx != GPIO_UNCONNECTED) {
		UART_PSELRXD(uart) = __GPIO2PIN(rx);
	} else {
		UART_PSELRXD(uart) = rx;
	}
	if (tx != GPIO_UNCONNECTED) {
		UART_PSELTXD(uart) = __GPIO2PIN(tx);
	} else {
		UART_PSELTXD(uart) = tx;
	}
	if (cts != GPIO_UNCONNECTED) {
		UART_PSELCTS(uart) = __GPIO2PIN(cts);
	} else {
		UART_PSELCTS(uart) = cts;
	}
	if (rts != GPIO_UNCONNECTED) {
		UART_PSELRTS(uart) = __GPIO2PIN(rts);
	} else {
		UART_PSELRTS(uart) = rts;
	}
}