/* Configure Pulse divider for IrDA function on UART peripheral.  */
void UART_IrDAPulseDivConfig(LPC_UART_TypeDef *UARTx, UART_IrDA_PULSE_Type PulseDiv)
/* Configure Pulse divider for IrDA function on UART peripheral.  */
void UART_IrDAPulseDivConfig(LPC_UART_TypeDef *UARTx, UART_IrDA_PULSE_Type PulseDiv)
{
    uint32_t tmp, tmp1;
    tmp1 = UART_ICR_PULSEDIV(PulseDiv);
    tmp = UARTx->ICR & (~ UART_ICR_PULSEDIV(7));
    tmp |= tmp1 | UART_ICR_FIXPULSE_EN;
    UARTx->ICR = tmp & UART_ICR_BITMASK;
}