1.39.12.4 PAC_CallbackRegister Function

C

void PAC_CallbackRegister( PAC_CALLBACK callback, uintptr_t context )

Summary

Registers the function to be called when a PAC error has occurred.

Description

This function registers the callback function to be called when a PAC error has occurred. The function is available only when the module interrupt is enabled in MHC.

Precondition

PAC_Initialize() function should have been called once. Interrupt option in MHC should have been enabled.

Parameters

Param Description
callback callback function pointer. Setting this to NULL will disable the callback feature.
context Allows the caller to provide a context value (usually a pointer to the callers context for multi-instance clients).

Returns

None.

Example

void APP_PACErrorCallback( uintptr_t context )
{
    // PAC Error occurred. Fix the root-cause so that PAC error never occurs.
}

PAC_CallbackRegister(APP_PACErrorCallback, NULL);

Remarks

Context value can be set to NULL if this is not required.