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