/* Enables or disables the USART's transmitter or receiver.  */
void USART_DirectionModeCmd(USART_TypeDef *USARTx, uint32_t USART_DirectionMode, FunctionalState NewState)
/* Enables or disables the USART's transmitter or receiver.  */
void USART_DirectionModeCmd(USART_TypeDef *USARTx, uint32_t USART_DirectionMode, FunctionalState NewState)
{
  assert_param(IS_USART_ALL_PERIPH(USARTx));
  assert_param(IS_USART_MODE(USART_DirectionMode));
  assert_param(IS_FUNCTIONAL_STATE(NewState));
  if (NewState != DISABLE)
  {
    USARTx->CR1 |= USART_DirectionMode;
  }
  else
  {
    USARTx->CR1 &= (uint32_t)~USART_DirectionMode;
  }
}