1.6.2.26 ADCHS_ComparatorxCallbackRegister Function

C

void ADCHS_ComparatorxCallbackRegister(ADCHS_DC_CALLBACK callback, uintptr_t context) // x - Comparator number 

Summary

Registers the function to be called from the ADC comparator interrupt

Description

This function registers the callback function to be called from the ADC comparator 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_Comparator1_Callback_Fn(ADCHS_CHANNEL_NUM channel, uintptr_t context)
{
}

ADCHS_Comparator1CallbackRegister(ADCHS_Comparator1_Callback_Fn, NULL);

Remarks

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