1.7.11.8 EIC_CALLBACK Typedef

C

typedef void (*EIC_CALLBACK) (uintptr_t context);

Summary

Defines the data type and function signature of the EIC peripheral callback function.

Description

This data type defines the function signature for the EIC peripheral callback function. The EIC peripheral will call back the client's function with this signature when a interrupt condition has been sensed on the pin. The EIC library allows the application to register a callback function for each enabled external interrupt.

Precondition

EIC_Initialize must have been called for the given EIC peripheral instance and EIC_CallbackRegister must have been called to set the function to be called.

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 EIC_Pin0Callback (uintptr_t context)
{
    // This pin an interrupt condition has been sensed on Pin 0.
}

EIC_CallbackRegister(EIC_PIN_0, EIC_Callback, 0);

Remarks

None.