1.2.2.23 1.8.2.10 1.9.1.23 1.25.1.7 1.26.1.7 1.27.2.7 1.28.2.10 1.35.1.7 1.36.1.7 1.41.1.7 ADC_ChannelResultIsReady Function

C

bool ADC_ChannelResultIsReady(ADC_CHANNEL_NUM channel)
bool ADC_ChannelResultIsReady(ADC_CHANNEL channel)
bool ADC_ChannelResultIsReady(ADC_CORE_NUM core, ADC_CHANNEL_NUM channel)

Summary

Returns the status of the channel conversion

Description

This function returns the status of the channel whether conversion is complete and result is available

Precondition

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

Parameters

Param Description
channel Channel number
core ADC core n

Returns

false - channel is disabled or conversion is not yet finished true - channel is enabled and result is available

Example

bool ch_status;
ADC_Initialize();
ADC_ChannelsEnable(ADC_CH0);
ADC_ConversionStart();
ch_status = ADC_ChannelResultIsReady(ADC_CH0);
if (ADC_ChannelResultIsReady(ADC_CORE_NUM1, ADC_CH0))
{
    // ADC conversion is complete. Read the conversion result.
}

Remarks

None