This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

A question about the Notify_registerEvent() function

hello everybody,

           i am trying to learn IPC communication, when i try to run the example of notify single image for evm6472, I am a little confused. When  i registered an event with a callback function by using the Notify_registerEvent(), how could i pass some parameters to the callbackFunction? Bellow is the basic code of the notify example:

......

Void cbFxn(UInt16 procId, UInt16 lineId,  UInt32 eventId, UArg arg, UInt32 payload)

{

    /* The payload is a sequence number. */

    recvProcId = procId;

    seq = payload;

    Semaphore_post(semHandle);

}

......

main()

{

......

 status = Notify_registerEvent(srcProc, INTERRUPT_LINE, EVENTID, (Notify_FnNotifyCbck)cbFxn, NULL);

......

}

 

regardes

 

  • Hi Jianlei,

    The last argument to Notify_registerEvent or Notify_registerEventSingle is the 'arg' passed into the callback function.  The 'payload' argument to Notify_sendEvent gets sent across to the remote processor and is passed to the callback function via the 'payload' argument to cbFxn.

    Please refer to the Notify section of the IPC User Guide and the Doxygen documentation for the Notify module for more information about it.

    Regards,

    Shreyas