PreviousNext
Notification
Help > Custom DPA Handler > Events > Notification

This event is called when a DPA Request was successfully processed and the DPA Request was sent. DPA Request (but not the original DPA Request) is available at this event. The user can sense what peripheral was accessed and react accordingly. _NADR contains the address of the sender of the original DPA Requests i.e. address to send DPA Request to.

 

Example

 

 case DpaEvent_Notification:

 // Anything was written to the RAM?

 if ( _PNUM == PNUM_RAM && _PCMD == CMD_RAM_WRITE )

 {

       if ( PeripheralRam[0] == 0xAB )

              setLEDR();

       else

              setLEDG();

 

       ramWritten = TRUE;

 }

 

 if ( _PNUM == PNUM_EEPROM && _PCMD == CMD_EEPROM_WRITE )

 {

       uns16 someData @ bufferINFO;

 

       eeReadData( PERIPHERAL_EEPROM_START, sizeof( someData ) );

       if ( someData == 0 )

       {

        // …

       }

 }

 

 return Carry;

 

☼ See example code CustomDpaHandler-LED-MemoryMapping.c, CustomDpaHandler-PeripheralMemoryMapping.c for more details.