1.1.2.4.16 DRV_G3_MACRT_ExternalInterruptHandler Function
C
void DRV_G3_MACRT_ExternalInterruptHandler ( const PIO_PIN pin, const uintptr_t context );
Summary
Allows application to register callback for PLC Interrupt pin.
Description
This function allows a client to register a callback function to handle G3 MAC RT interrupt.
Precondition
DRV_G3_MACRT_Initialize must have been called before calling this function.
Parameters
Param | Description |
---|---|
pin | PIO pin where interrupt source is connected |
context | Pointer to parameters to be passed to Handler function |
Returns
None.
Example
// Initialize G3 MAC RT Driver Instance
sysObj.drvPLCMacRt = DRV_G3_MACRT_Initialize(DRV_G3_MACRT_INDEX, (SYS_MODULE_INIT *)&drvPLCMacRtInitData);
// Register Callback function to handle PLC interruption
PIO_PinInterruptCallbackRegister(DRV_G3_MACRT_EXT_INT_PIN, DRV_G3_MACRT_ExternalInterruptHandler, sysObj.drvPLCMacRt);
Remarks
See plib_pio.h for more details.