/* Enables SIR (IrDA) mode on the specified UART.  */
void UARTEnableIrDA(unsigned long ulBase)
/* Enables SIR (IrDA) mode on the specified UART.  */
void UARTEnableIrDA(unsigned long ulBase)
{
    xASSERT(UARTBaseValid(ulBase));
    xHWREG(ulBase + USART_CR2) &= ~(USART_CR2_LINEN | USART_CR2_CLKEN | USART_CR2_STOP_M);
    xHWREG(ulBase + USART_CR3) &= ~(USART_CR3_SCEN | USART_CR3_HDSEL);
    xHWREG(ulBase + USART_CR3) |= (USART_CR3_IREN);
}