1.8.2.14 ADC_ComparisonEventResultIsReady Function

C

bool ADC_ComparisonEventResultIsReady(void)

Summary

Returns the status of the Comparison event

Description

This function returns the status of the Comparison event whether comparison event has occurred and result is available

Precondition

ADC_Initialize() function must have been called first for the associated instance.

Parameters

Param Description
void None

Returns

bool - status of the comparison event false: No comparison event true: At least one comparison event has occurred

Example

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

Remarks

None