1.8.2.15 ADC_ComparisonRestart Function

C

void ADC_ComparisonRestart(void)

Summary

Restart the comparison function.

Description

This function restarts the comparison function. And it stops the conversion result storage until the next comparison match.

Precondition

ADC_Initialize() function must have been called first for the associated instance and channels must have been enabled using ADC_ChannelsEnable() function.

Parameters

None

Returns

None.

Example

bool comp_event;
ADC_Initialize();
ADC_ChannelsEnable(ADC_CH0);
ADC_ConversionStart();
comp_event = ADC_ComparisonEventResultIsReady();
if (comp_event)
{
    result = ADC_ChannelResultGet(ADC_CH0);
    ADC_ComparisonRestart();
}

Remarks

This function stops the conversion result storage until the next comparison match.