/* Set the PWM frequency of the PWM module. 
The  */
unsigned long PWMFrequencyConfig(unsigned long ulBase, unsigned long ulConfig)
/* Set the PWM frequency of the PWM module. 
The  */
unsigned long PWMFrequencyConfig(unsigned long ulBase, unsigned long ulConfig)
{
    unsigned char ulPreScale;
    unsigned short usMODValue;
    xASSERT((ulBase == PWMA_BASE) || (ulBase == PWMB_BASE) || 
            (ulBase == PWMC_BASE));
    ulPreScale = ulConfig & 0x07;
    usMODValue = ((ulConfig & 0xFFFF0000) >> 16);
    xHWREG(ulBase + TPM_SC) &= ~TPM_SC_PS_M;
    xHWREG(ulBase + TPM_SC) |= ulPreScale;
    xHWREG(ulBase + TPM_MOD) = usMODValue;
    return(SysCtlPWMAndUART0ClkGet() / usMODValue / ulPreScale); 
}