Jump to main content

##

# 2.57.8 ICAPx_Error_CallbackRegister Function

## C

    /* x = ICAP instance number */

    void ICAPx_Error_CallbackRegister(ICAP_CALLBACK callback, uintptr_t context)

## Summary

Sets the callback function for a ICAP error interrupt.

## Description

This function sets the callback function that will be called when the ICAP error occurs.

## Precondition

ICAPx_Initialize() function must have been called first.

## Parameters

Param | Description
--- | ---
callback | a pointer to the function to be called when value is reached. Use NULL to Unregister the compare callback
context | a pointer to user defined data to be used when the callback function is called. NULL can be passed if no data needed

## Returns

None.

## Example

    void APP_ICAPTransferHandler(uintptr_t context)
    {

    }

    ICAP1_Error_CallbackRegister(&APP_ICAPTransferHandler, (uintptr_t)NULL);

## Remarks

None