1.41.21.29 TCx_QuadratureCallbackRegister Function
C
void TCx_QuadratureCallbackRegister ( TC_QUADRATURE_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_QuadratureInitialize 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 TC_CallbackFn(TCx_QUADRATURE_STATUS status, uintptr_t context);
TC0_QuadratureInitialize();
TC0_QuadratureCallbackRegister(TC_CallbackFn, NULL);
Remarks
Context value can be set to NULL if not required. To disable callback function, pass NULL for the callback parameter.