Intel
®
IXP400 Digital Signal Processing (DSP) Software Version 2.5
Message Format and Delivery Mechanism
20 API Reference Manual
4.0 Message Format and Delivery Mechanism
There are two message queues (in-bound and out-bound) for the user application to send control
messages and to receive response and event messages, respectively. The message queues are created
from pre-allocated memory buffers in consideration of maximum message size and total number of
messages. The entire message header and content are copied to/from the buffers in the message
queue during message transmitting and receiving. The memory used for messaging is not shared be-
tween the message sender and the receiver.
4.1 Message Functions
Three functions are provided to send and receive messages.
XStatus_t xMsgSend (void *pMsgBuf);
Description Sends a control message to the in-bound message queue
Input
pMsgBuf – Pointer to the message buffer.
Output None
Return
•
XSUCC — If successful
•
XERROR — If errors
Caution Message buffer requires 4-byte alignment.
Note Message buffer can be used for any other purpose after sending.
XStatus_t xMsgReceive (void *pMsgBuf, UINT16 channel, int timeout);
Description Receives acknowledgement or event from the outbound message queue.
Input
•
pMsgBuf – Pointer to the message buffer
•
channel – Channel number. (Reserved for future extension)
•
timeout – Waiting flag
—
XWAIT_NONE — If return immediately
—
XWAIT_FOREVER — If never time out (no other values are valid.)
Output None
Return
•
XSUCC — If successful
•
XERROR — If errors
Caution
Message buffer requires 4-byte alignment. The receiving buffer must fit the maximum
message size. Cannot be called from ISR.
XStatus_t xMsgWrite (void *pMsgBuf); (Sheet 1 of 2)
Description
Posts a message (e.g. an user defined external event message) to the out-bound queue so
that it can be retrieved by
XMsgReceive().
Input pMsgBuf — Pointer to the message buffer.
Output None