/* Enables or disables the UART Half Duplex communication.  */
void UART_HalfDuplexCmd(UART_TypeDef *uart, FunctionalState state)
/* Enables or disables the UART Half Duplex communication.  */
void UART_HalfDuplexCmd(UART_TypeDef *uart, FunctionalState state)
{
    MODIFY_REG(uart->SCR, UART_SCR_HDSEL, state << UART_SCR_HDSEL_Pos);
}