1.11.1.30 ADCHS_FilterxCallbackRegister Function

C

void ADCHS_FilterxCallbackRegister(ADCHS_DF_CALLBACK callback, uintptr_t context) // x - Filter number

Summary

Registers the function to be called from the ADC filter ready interrupt

Description

This function registers the callback function to be called from the ADC filter ready interrupt

Precondition

ADCHS_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 ADCHS_Filter1_Callback_Fn(uintptr_t context)
{
    uint16_t filter_data;
    
    filter_data = ADCHS_Filter1DataGet();
}

ADCHS_Filter1CallbackRegister(ADCHS_Filter1_Callback_Fn, NULL);

Remarks

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