Hi,
I read the following below the dot line on Notify_registerEvent(). I do not understand how to use Notify_E_ALREADYEXISTS. " Notify_E_ALREADYEXISTS " is an enum? I cannot see that enum definition yet.
the varible returned by Notify_registerEvent may equal " Notify_E_ALREADYEXISTS "?
Could you give me a simple example on using " Notify_E_ALREADYEXISTS "?
Thanks.
.......................
The Notify_registerEvent() function (like most other Notify APIs) uses a
ti.sdo.utils.MultiProc ID and line ID to target a specific interrupt line
to/from a specific processor on a device.
Int status;
armProcId = MultiProc_getId("ARM");
Ipc_start();
/* Register cbFxn with Notify. It will be called when ARM
* sends event number EVENTID to line #0 on this processor.
* The argument 0x1010 is passed to the callback function. */
status =Notify_registerEvent(armProcId, 0, EVENTID,
(Notify_FnNotifyCbck)cbFxn, 0x1010);
if (status < 0) {
System_abort("Notify_registerEvent failed\n");
}
The line ID number is typically 0 (zero), but is provided for use on systems
that have multiple interrupt lines between processors.
When using Notify_registerEvent(), multiple callbacks may be registered
with a single event. If you plan to register only one callback function for
an event on this processor, you can call Notify_registerEventSingle()
instead of Notify_registerEvent(). Better performance is provided with
Notify_registerEventSingle(), and a Notify_E_ALREADYEXISTS status
is returned if you try to register a second callback for the same event.