/* Select the ACMP- input source of the comparator.  */
void ACMPNegativeSrcSet(unsigned long ulBase, unsigned long ulComp, unsigned long ulSource)
/* Select the ACMP- input source of the comparator.  */
void ACMPNegativeSrcSet(unsigned long ulBase, unsigned long ulComp, unsigned long ulSource)
{
    unsigned long ulCRAddr;
    xASSERT((ulBase == ACMP01_BASE) || (ulBase == ACMP23_BASE));
    xASSERT((ulComp >= 0) && (ulComp < 2));
    xASSERT((ulSource == ACMP_ASRCN_PIN) || (ulSource == ACMP_ASRCN_REF));
    ulCRAddr = ulBase + ACMP_CR0 + (4 * ulComp);
    xHWREG(ulCRAddr) &= ~ACMP_CR_CN;
    xHWREG(ulCRAddr) |= ulSource;
}