/* Enables or disables the USART's Half Duplex communication.  */
void USART_EnableHalfDuplex(USART_Module *USARTx, FunctionalState Cmd)
/* Enables or disables the USART's Half Duplex communication.  */
void USART_EnableHalfDuplex(USART_Module *USARTx, FunctionalState Cmd)
{
    assert_param(IS_USART_ALL_PERIPH(USARTx));
    assert_param(IS_FUNCTIONAL_STATE(Cmd));
    if (Cmd != DISABLE)
    {
        USARTx->CTRL3 |= CTRL3_HDMEN_SET;
    }
    else
    {
        USARTx->CTRL3 &= CTRL3_HDMEN_RESET;
    }
}