📄 msg_pub.h
字号:
#ifdef __cplusplusextern "C"{#endif #ifndef __INC_MSG_PUB_H__#define __INC_MSG_PUB_H__#define MSG_SYNC_EVENT 0x1#ifndef L3_MSG_HEAD_LEN#define L3_MSG_HEAD_LEN (5*sizeof(U32))#endiftypedef enum startup{ STARTUP_BEFORE_INITIAL=-1, STARTUP_INITIAL=0, STARTUP_LOAD_DATA, STARTUP_GO, STARTUP_BUTT}START_ORDER_E;typedef enum msg_prio{ MSG_PRIO_NORMAL=0, MSG_PRIO_HIGH, MSG_PRIO_BUTT} MSG_PRIO;#define MSG_INIT_NO_MEM AOS_MAKE_ERRNO( MPE_MSG, 1 )#define MSG_INVALID AOS_MAKE_ERRNO( MPE_MSG, 2 )#define MSG_MPS_INVALID AOS_MAKE_ERRNO( MPE_MSG, 3 )#define MSG_MPS_EXIST AOS_MAKE_ERRNO( MPE_MSG, 4 )#define MSG_MPE_INVALID AOS_MAKE_ERRNO( MPE_MSG, 5 )#define MSG_MPE_EXIST AOS_MAKE_ERRNO( MPE_MSG, 6 )#define MSG_MPS_PRIO_INVALID AOS_MAKE_ERRNO( MPE_MSG, 7 )#define MSG_FREE_NOT_ALLOCATED AOS_MAKE_ERRNO( MPE_MSG, 8 )#define MSG_RESEND AOS_MAKE_ERRNO( MPE_MSG, 9 )#define MSG_NO_TASK AOS_MAKE_ERRNO( MPE_MSG, 10 )#define MSG_MSG_PRIO_INVALID AOS_MAKE_ERRNO( MPE_MSG, 11 )#define MSG_MPE_NO_MSGB AOS_MAKE_ERRNO( MPE_MSG, 12 )#define MSG_MPE_PRINT_DISABLE AOS_MAKE_ERRNO( MPE_MSG, 13 )#define MSG_SRC_PROCESSORID_INVALID AOS_MAKE_ERRNO( MPE_MSG, 14 )#define MSG_DST_PROCESSORID_INVALID AOS_MAKE_ERRNO( MPE_MSG, 15 )#define MSG_LCM_LINK_NULL AOS_MAKE_ERRNO( MPE_MSG, 16 )typedef struct msg_s{ U32 srcProcessorId; U32 srcMpe; U32 dstProcessorId; U32 dstMpe; U32 ulSize; U32 msgPrio; VOID *pvMsgBuf;}MSG_S;typedef U32 (*MPE_INIT_ROUTINE)( START_ORDER_E order );typedef VOID (*MPE_RUN_ROUTINE)( MSG_S *msg, VOID*pvMsgBuf ); U32 m_msg_init( );VOID* aos_msg_alloc_x( MPE mpe, U32 ulSize, S8 *pszFile, U32 ulLine );U32 aos_msg_free( VOID *pvMsgBuf );U32 aos_msg_send( MSG_S *msg );U32 aos_msg_trysend( MSG_S *msg );U32 aos_mps_reg( S8 name[AOS_NAME_LEN+1], MPS mps, TASK_PRIO msgTskPrio );U32 aos_mpe_reg( S8 name[AOS_NAME_LEN+1], MPE mpe, MPS mps, MPE_INIT_ROUTINE initRtn, MPE_RUN_ROUTINE runRtn );U32 aos_mps_name(MPS mps, S8 * szName);U32 aos_mpe_name(MPS mps, S8 * szName);U32 m_msg_system_start();#define aos_msg_alloc(mpe,ulSize) \ aos_msg_alloc_x(mpe,ulSize,__FILE__,__LINE__)VOID aos_msg_send2( VOID *pvMsg );VOID aos_msg_send3( struct msg_blk *mb, MPE srcMpe, MPE dstMpe ); #endif#ifdef __cplusplus}#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -