1.3.23.44 TCx_CompareCallbackRegister Function
C
/* x = TC instance number */
void TCx_CompareCallbackRegister( TCx_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
TCx_CompareInitialize() must have been called first.
Parameters
Param | Description |
---|---|
callback | callback function pointer |
context | Allows the caller to provide a context value (usually a pointerto the callers context for multi-instance clients) |
Returns
None.
Example
void TC_Callback_Fn( uintptr_t context );
TC0_CompareInitialize();
TC0_CompareCallbackRegister(TC_Callback_Fn, NULL);
Remarks
Context value can be set to NULL if not required. To disable callback function, pass NULL for the callback parameter.