1.3.17.15 PDECx_HALLCallbackRegister Function

C

void PDECx_HALLCallbackRegister ( PDEC_HALL_CALLBACK callback, uintptr_t context ) // x is instance of the peripheral and it is applicable only for devices having multiple instances of the peripheral.

Summary

Registers the function to be called from interrupt.

Description

This function registers the callback function to be called from interrupt

Precondition

PDECx_HALLInitialize 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 PDEC_CallbackFn(PDEC_HALL_STATUS status, uintptr_t context)
{
}

PDEC_HALLInitialize();
PDEC_HALLCallbackRegister(PDEC_CallbackFn, NULL);

Remarks

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