This section describes the CSDADC Callback Function.
A callback allows a user to execute custom code called from the CSDADC middleware when the current cycle of enabled channel conversion finishes in the continuous mode.
To assign a user’s function to this callback presented in the middleware, do the following:
Assign a pointer to the variable of the cy_stc_csdadc_context_t type as below:
cy_stc_csdadc_context_t * ptrCxt = &My_CSDADC_context;
Write the callback function implementation (in any user file) using the following function prototype:
void CallbackFunction((void *) ptrCxt);
Assign the function to the CSDADC context structure by using the function Cy_CSDADC_RegisterCallback();
Use the Cy_CSDADC_UnRegisterCallback() API to un-register the callback function that was previously assigned.