/* Registers an interrupt handler for the timer interrupt. */
void TimerIntRegister(unsigned long ulBase, unsigned long ulTimer, void(*pfnHandler)(void))
/* Registers an interrupt handler for the timer interrupt. */
void TimerIntRegister(unsigned long ulBase, unsigned long ulTimer, void(*pfnHandler)(void))
{
    ASSERT(TimerBaseValid(ulBase));
    ASSERT((ulTimer == TIMER_A) || (ulTimer == TIMER_B) ||
           (ulTimer == TIMER_BOTH));
    ulBase = TimerIntNumberGet(ulBase);
    if(ulTimer & TIMER_A)
    {
        IntRegister(ulBase, pfnHandler);
        IntEnable(ulBase);
    }
    if(ulTimer & TIMER_B)
    {
        IntRegister(ulBase + 1, pfnHandler);
        IntEnable(ulBase + 1);
    }
}