2.5.12 AFECx_CallbackRegister Function

C

void AFECx_CallbackRegister (AFECx_CALLBACK callback, uintptr_t context) // x - Instance of the AFEC peripheral

Summary

Registers the function to be called from interrupt

Description

This function registers the callback function to be called from interrupt

Precondition

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

Parameters

ParamDescription
callbackcallback function pointer
contextAllows the caller to provide a context value (usually a pointer to the callers context for multi-instance clients)

Returns

None.

Example

void AFECx_Callback_Fn(uintptr_t context);

AFEC0_Initialize();
AFEC0_CallbackRegister(AFEC_Callback_Fn, NULL);

Remarks

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