/* Enable the PWM interrupt of the PWM module. 
The  */
void PWMIntEnable(unsigned long ulBase, unsigned long ulChannel, unsigned long ulIntType)
/* Enable the PWM interrupt of the PWM module. 
The  */
void PWMIntEnable(unsigned long ulBase, unsigned long ulChannel, unsigned long ulIntType)
{
    xASSERT((ulBase == PWMA_BASE) || (ulBase == PWMB_BASE) || 
            (ulBase == PWMC_BASE));
    if(ulBase == PWMA_BASE)
    {
        xASSERT((ulChannel >= 0) && (ulChannel <= 5));
    }
    else
    {
        xASSERT((ulChannel >= 0) && (ulChannel <= 1));
    }
    xASSERT((ulIntType == PWM_INT_CHXF) || (ulIntType == PWM_INT_TOF));
    if (ulIntType == PWM_INT_TOF)
    {
        xHWREG(ulBase + TPM_SC) |= TPM_SC_TOIE; 
    }
    else
    {
        xHWREG(ulBase + TPM_C0SC + 8 * ulChannel) |= TPM_CNSC_CHIE;
    }
}