/* Select the ACMP- input source of the comparator.  */
void ACMPConfigure(unsigned long ulBase, unsigned long ulCompID, unsigned long ulConfig)
/* Select the ACMP- input source of the comparator.  */
void ACMPConfigure(unsigned long ulBase, unsigned long ulCompID, unsigned long ulConfig)
{   
    xASSERT(ulBase == ACMP_BASE);
    xASSERT((ulCompID >= 0) && (ulCompID < 2));
    xASSERT((((ulConfig & ACMP_POSITIVE_INPUT) == ACMP_POSITIVE_INPUT) || 
            ((ulConfig & ACMP_POSITIVE_INPUT) == ACMP_NEGATIVE_INPUT)) &&
            (((ulConfig & ACMP_MODE_CMP) == ACMP_MODE_CMP) || 
            ((ulConfig & ACMP_MODE_CMP) == ACMP_MODE_OP)));
    xHWREG(ulBase + ACMP_OPACR + ulCompID*0x100) &= ~ACMP_CONFIG_MASK;
    xHWREG(ulBase + ACMP_OPACR + ulCompID*0x100) |= ulConfig;
}