1.17.7.8 EVIC_ExternalInterruptCallbackRegister Function
C
bool EVIC_ExternalInterruptCallbackRegister(
EXTERNAL_INT_PIN extIntPin,
const EXTERNAL_INT_PIN_CALLBACK callback,
uintptr_t context
);
Summary
Allows application to register callback for every external interrupt pin.
Description
This function allows application to register an event handling function for the PLIB to call back when external interrupt occurs on the selected pin.
At any point if application wants to stop the callback, it can call this function with "callback" value as NULL.
Precondition
Corresponding pin interrupt must be enabled in EVIC manager.
Parameters
Param | Description |
---|---|
extIntPin | One of the external interrupt pins from the enum EXTERNAL_INT_PIN |
callback | Pointer to the event handler function implemented by the user |
context | The value of parameter will be passed back to the application unchanged, when the eventHandler function is called. It can be used to identify any application specific value. |
Returns
Callback registration status:
-
true: Callback was successfully registered
-
false: Callback was not registered
Example
if(EVIC_ExternalInterruptCallbackRegister(EXTERNAL_INT_1, &APP_PinHandler, NULL))
{
// callback got registered
}
Remarks
None.