2.3.19 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
