1.15.2.7 CCPx_TimerCallbackRegister Function

C

/* x = CCP instance number */

void CCPx_TimerCallbackRegister( CCP_TIMER_CALLBACK callback, uintptr_t context )

Summary

Registers the function to be called from interrupt.

Description

This function registers the callback function to be called from interrupt.

Precondition

CCPx_TimerInitialize() must have been called first.

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 CCP_Callback_Fn( uint32_t status, uintptr_t context );

CCP1_TimerInitialize();
CCP1_TimerCallbackRegister(CCP_Callback_Fn, NULL);

Remarks

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