Intel
®
IXP400 Digital Signal Processing (DSP) Software Version 2.5
Message Format and Delivery Mechanism
API Reference Manual 21
4.2 Message Header Format
Return
•
XSUCC — If successful
•
XERROR — If errors
Caution Message buffer requires 4-byte alignment.
Note The message buffer can be used for any other purpose, after posting.
Format
typedef struct{
UINT32 transactionId; /* used by apps to track the message */
UINT16 instance; /* instance ID (1-0xffff), 0:reserved */
UINT8 resource; /* MPR resource type */
UINT8 reserved; /* reserved for future */
UINT16 size; /* total size in bytes */
UINT8 type; /* message type */
UINT8 attribute; /* attribute, reserved for future */
} XMsgHdr_t, *XMsgRef_t_t;
Caution Message content must follow the header in contiguous memory.
Macros
#define XMSG_MAKE_HEAD(pMsg, trans, res, inst, sz, typ, attr) \
((XMsgRef_t)(pMsg))->transactionId = trans;\
((XMsgRef_t)(pMsg))->instance = inst;\
((XMsgRef_t)(pMsg))->resource = res;\
((XMsgRef_t)(pMsg))->reserved = 0;\
((XMsgRef_t)(pMsg))->size = sz;\
((XMsgRef_t)(pMsg))->type = typ;\
((XMsgRef_t)(pMsg))->attribute = attr;
XStatus_t xMsgWrite (void *pMsgBuf); (Sheet 2 of 2)