2.3.64 ADCx_ChannelCallbackRegister Function

C

void ADCx_ChannelCallbackRegister(ADC_CHANNEL channel,ADC_CHANNEL_CALLBACK callback,uintptr_t context); // x is instance of the peripheral and it is applicable only for devices having multiple instances of the peripheral.

Summary

Define custom callback for ADCx Channel event.

Description

This function can be used to define custom callback for ADCx Channel event. Read the conversion result of the corresponding channel in the custom callback.

Precondition

None.

Parameters

ParamDescription
channelSelected channel
callbackAddress of the channel callback function
contextA value (usually a pointer) passed (unused) into the function identified by the callback parameter.

Returns

None.

Example

ADC1_Initialize();
ADC1_ChannelCallbackRegister(ADC1_CHANNEL channel,ADC_CHANNEL_CALLBACK callback,uintptr_t context);

Remarks

None.