/* Enable the ADC Watchdog monitor. 
Enables the comparator to monitor the analog input. */
void ADCMoniEnable(unsigned long ulBase, unsigned long ulChanType)
/* Enable the ADC Watchdog monitor. 
Enables the comparator to monitor the analog input. */
void ADCMoniEnable(unsigned long ulBase, unsigned long ulChanType)
{
    xASSERT((ulBase == ADC1_BASE) || (ulBase == ADC2_BASE) || (ulBase == ADC3_BASE));
    xASSERT((ulChanType == ADC_TYPE_REGULAR) || (ulChanType == ADC_TYPE_INJECTED) || 
            (ulChanType == (ADC_TYPE_REGULAR|ADC_TYPE_INJECTED)));
    if(ulChanType == ADC_TYPE_REGULAR)
    {
        xHWREG(ulBase + ADC_CR1) |= ADC_TYPE_REGULAR;
    }
    else if(ulChanType == ADC_TYPE_INJECTED)
    {
        xHWREG(ulBase + ADC_CR1) |= ADC_TYPE_INJECTED;
    }
    else
    {
        xHWREG(ulBase + ADC_CR1) |= (ADC_TYPE_REGULAR|ADC_TYPE_INJECTED);
    }
}