1.2.2.28 ADC_GlobalCallbackRegister Function

C

void ADC_GlobalCallbackRegister(ADC_GLOBAL_CALLBACK callback, uintptr_t context)

Summary

Registers the global callback function

Description

This function registers the callback function which will be called from interrupt

Precondition

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

Parameters

Param Description
callback callback function pointer
context Allows the caller to provide a context value (usually a pointer to the callers context for multi-instance clients)

Returns

None.

Example

void ADC_Global_Callback_Fn(ADC_GLOBAL_INT status, uintptr_t context)
{
    
}

ADC_GlobalCallbackRegister(ADC_Global_Callback_Fn, NULL);

Remarks

Context value can be set to NULL if not required. To disable callback function, pass NULL for the callback parameter.