/* The peripheral clock is the same as the processor clock. The frequency of the system clock is the value returned by SysCtlClockGet(), or it can be explicitly hard coded if it is constant and known (to save the code/execution overhead of a call to SysCtlClockGet()). */
void UARTConfigSetExpClk(unsigned long ulBase, unsigned long ulUARTClk, unsigned long ulBaud, unsigned long ulConfig)
/* The peripheral clock is the same as the processor clock. The frequency of the system clock is the value returned by SysCtlClockGet(), or it can be explicitly hard coded if it is constant and known (to save the code/execution overhead of a call to SysCtlClockGet()). */
void UARTConfigSetExpClk(unsigned long ulBase, unsigned long ulUARTClk, unsigned long ulBaud, unsigned long ulConfig)
{
    unsigned long ulDiv;
    ASSERT(UARTBaseValid(ulBase));
    ASSERT(ulBaud != 0);
    UARTDisable(ulBase);
    if((ulBaud * 16) > ulUARTClk)
    {
        HWREG(ulBase + UART_O_CTL) |= UART_CTL_HSE;
        ulBaud /= 2;
    }
    else
    {
        HWREG(ulBase + UART_O_CTL) &= ~(UART_CTL_HSE);
    }
    ulDiv = (((ulUARTClk * 8) / ulBaud) + 1) / 2;
    HWREG(ulBase + UART_O_IBRD) = ulDiv / 64;
    HWREG(ulBase + UART_O_FBRD) = ulDiv % 64;
    HWREG(ulBase + UART_O_LCRH) = ulConfig;
    HWREG(ulBase + UART_O_FR) = 0;
    UARTEnable(ulBase);
}