1.3.16.7 PAC_CALLBACK Typedef

C

typedef void (*PAC_CALLBACK)( uintptr_t context );

Summary

Defines the data type and function signature for the PAC peripheral callback function.

Description

This data type defines the function signature for the PAC peripheral callback function. The PAC peripheral will call back the function with this signature when a access violation has been detected.

Precondition

None.

Parameters

Param Description
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

The callback feature is only available when the library was generated with interrupt option (in MHC) enabled.

The function will execute within an interrupt context. Avoid calling computationally intensive or blocking functions from within the callback function.