38 lines
1.1 KiB
C
38 lines
1.1 KiB
C
![]() |
// +FHDR------------------------------------------------------------
|
||
|
// Copyright (c) 2022 SmartLogic.
|
||
|
// ALL RIGHTS RESERVED
|
||
|
// -----------------------------------------------------------------
|
||
|
// Filename : msg_transfer_mbuffer.h
|
||
|
// Author : xianfeng.du
|
||
|
// Created On : 2022-12-21
|
||
|
// Last Modified :
|
||
|
// -----------------------------------------------------------------
|
||
|
// Description:
|
||
|
//
|
||
|
//
|
||
|
// -FHDR------------------------------------------------------------
|
||
|
|
||
|
#ifndef __MSG_TRANSFER_MEM_BUFFER_H__
|
||
|
#define __MSG_TRANSFER_MEM_BUFFER_H__
|
||
|
|
||
|
#include "typedef.h"
|
||
|
|
||
|
typedef union tMsgMemBufAttribute{
|
||
|
uint32_t ele[4]; //aligned
|
||
|
struct {
|
||
|
uint32_t msgSize; // in bytes
|
||
|
uint8_t qNo;
|
||
|
uint8_t state;
|
||
|
uint16_t idx;
|
||
|
//uint8_t msgType; // 0=data, 1=control
|
||
|
//uint8_t eop;
|
||
|
//uint8_t nSegs;
|
||
|
};
|
||
|
} MsgMemBufAttr_t;
|
||
|
|
||
|
#define MSG_MBUF_HEAD_SIZE (sizeof(MsgMemBufAttr_t))
|
||
|
#define MSG_MBUF_ATTR(pBuf) ((MsgMemBufAttr_t *)((uint8_t *)pBuf - MSG_MBUF_HEAD_SIZE))
|
||
|
|
||
|
#endif
|
||
|
|