/* 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)
{
	USART_CR1(usart) = (USART_CR1(usart) & ~USART_MODE) | mode;
}