1.1.2.7 EC_REG_BANK_VTRx_CallbackRegister Function

C

/* x = VTR PAD monitor number */

void EC_REG_BANK_VTRx_CallbackRegister( EC_REG_BANK_CALLBACK callback, uintptr_t context )

Summary

Allows application to register a callback for the VTR PAD monitor

Description

This function sets the pointer to a client/application function to be called "back" on VTR PAD monitor events. It also passes a context value (usually a pointer to a context structure) that is passed into the function when it is called. The specified callback function will be called from the peripheral interrupt context.

Precondition

EC_REG_BANK_Initialize() function must have been called and the WDT must be started.

Parameters

Param Description
callback A pointer to a function with a calling signature defined by the EC_REG_BANK_CALLBACK data type. Setting this to NULL disables the callback feature.
context A value (usually a pointer) which is passed (unused) into the function identified by the callback parameter

Returns

None

Example

void vtr1_callback(uintptr_t context)
{
    // handle callback event
}

EC_REG_BANK_VTR1_CallbackRegister(vtr1_callback, 0);

Remarks

None