1.37.2.6 ADCx_ConversionStatusGet Function

C

bool ADCx_ConversionStatusGet( void ); // x is instance of the peripheral and it is applicable only for devices having multiple instances of the peripheral.

Summary

Returns the status of the conversion of the channel.

Description

This function returns the status of whether channel conversion is complete

Precondition

ADCx_Initialize() function must have been called first for the associated instance. Also conversion must have been started.

Parameters

None.

Returns

false - Conversion is not finished or not started yet true - Conversion is complete

Example

bool adcConversionStatus = false;
ADC0_Initialize();
ADC0_ConversionStart();
adcConversionStatus = ADC0_ConversionStatusGet();

Remarks

This function should be called only after conversion is started.