/* Registers an interrupt handler for the specified PWM generator block. */
void PWMGenIntRegister(unsigned long ulBase, unsigned long ulGen, void(*pfnIntHandler)(void))
/* Registers an interrupt handler for the specified PWM generator block. */
void PWMGenIntRegister(unsigned long ulBase, unsigned long ulGen, void(*pfnIntHandler)(void))
{
    unsigned long ulInt;
    ASSERT(ulBase == PWM_BASE);
    ASSERT(PWMGenValid(ulGen));
    if(ulGen == PWM_GEN_3)
    {
        ulInt = INT_PWM3;
    }
    else
    {
        ulInt = INT_PWM0 + (ulGen >> 6) - 1;
    }
    IntRegister(ulInt, pfnIntHandler);
    IntEnable(ulInt);
}