1.4.25.68 TCCx_PWMCallbackRegister Function
C
/* x = TCC instance number */
void TCCx_PWMCallbackRegister(TCC_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
TCCx_PWMInitialize must have been called first.
Parameters
Param | Description |
---|---|
callback | Callback function pointer. |
context | Value provided back to the caller by the callback (usually a pointer to the caller's context for multi-instance clients) |
Returns
None.
Example
void TCC_CallbackFn(uintptr_t context);
TCC0_PWMInitialize();
TCC0_PWMCallbackRegister(TCC_CallbackFn, (uintptr_t)NULL);
Remarks
Context value can be set to NULL if not required. To disable callback function, pass NULL for the callback parameter.