Intel IXP400 Frozen Dessert Maker User Manual


 
Intel
®
IXP400 Software
Access-Layer Components: NPE Message Handler (IxNpeMh) API
April 2005 IXP400 Software Version 2.0 Programmer’s Guide
226 Document Number: 252539, Revision: 007
The solicited callback list contains the list of callbacks corresponding to solicited messages not yet
received from the NPE. The solicited messages for a given ID are received in the same order that
those soliciting messages are sent, and the first ID-matching callback in the list always corresponds
to the next solicited message that is received.
15.3 Initializing the IxNpeMh
The IxNpeMh has two modes of operation, interrupted or polled. This refers to how the IxNpeMh
will receive messages from the NPEs. When an NPE has a message for the message handler, it will
always send an interrupt to the IxNpeMh, but the IxNpeMh must be set up for interrupt driven
operation for it to service the interrupt automatically.
15.3.1 Interrupt-Driven Operation
This is the preferred method of operation for the message handler. Here is a sample function call to
initialize the IxNpeMh component for interrupt driven operation:
The function takes a yes/no value from an enum, and now all messages from all the NPEs will be
serviced by IxNpeMH. The IxNpeMh handles messages from all NPEs and should only be
initialized once.
15.3.2 Polled Operation
Here is a sample function call to initialize the IxNpeMh component for interrupt driven operation:
The function takes a yes/no value from an enum, and now all messages from the NPEs must be
manually checked. The IxNpeMh handles messages from all NPEs, and should only be initialized
once.
After setting up polled operation the client must check for messages coming out of the NPEs. Here
is a sample function call that will check to see if NPE-A has a message to send:
Three separate function calls are required to check all three of the NPEs.
Note: This function call cannot be made from inside an interrupt service routine as it will use resource
protection mechanisms.
ixNpeMhInitialize (IX_NPEMH_NPEINTERRUPTS_YES);
ixNpeMhInitialize (IX_NPEMH_NPEINTERRUPTS_NO);
ixNpeMhMessagesReceive (IX_NPEMH_NPEID_NPEA);