/* USART Set Rx/Tx Mode. 
The mode can be selected as Rx only, Tx only or Rx+Tx. */
void usart_set_mode(uint32_t usart, uint32_t mode)
/* USART Set Rx/Tx Mode. 
The mode can be selected as Rx only, Tx only or Rx+Tx. */
void usart_set_mode(uint32_t usart, uint32_t mode)
{
	uint32_t reg32;
	reg32 = USART_CR1(usart);
	reg32 = (reg32 & ~USART_MODE_MASK) | mode;
	USART_CR1(usart) = reg32;
}