/* Registers an interrupt handler for the comparator interrupt. */
void ComparatorIntRegister(unsigned long ulBase, unsigned long ulComp, void(*pfnHandler)(void))
/* Registers an interrupt handler for the comparator interrupt. */
void ComparatorIntRegister(unsigned long ulBase, unsigned long ulComp, void(*pfnHandler)(void))
{
    ASSERT(ulBase == COMP_BASE);
    ASSERT(ulComp < 3);
    IntRegister(INT_COMP0 + ulComp, pfnHandler);
    IntEnable(INT_COMP0 + ulComp);
    HWREG(ulBase + COMP_O_ACINTEN) |= 1 << ulComp;
}