PreviousNext
IFaceReceive
Help > Custom DPA Handler > Events > IFaceReceive

This event is implemented at the [C] device. It is called when a DPA Request packet was received from the interface master. If the event handler returns TRUE, then further standard DPA Request processing (sending DPA Confirmation back to the interface master, passing DPA Request to the network internally by DpaApiRfTxDpaPacketCoordinator) is skipped. In this case, the interface master receives an error DPA Request with ERROR_INTERFACE_CUSTOM_HANDLER Response Code. The event is raised even when HWPID does not match.

 

Example

 

case DpaEvent_IFaceReceive:

 {

       // This example just for demonstration purposes consumes any DPA Request

       // CMD_LED_PULSE at peripheral PNUM_LEDR and pulses LEDG locally

        if ( _PNUM == PNUM_LEDR && _PCMD == CMD_LED_PULSE )

        {

              pulseLEDG();

              return TRUE;

        }

 

        return FALSE;

 }