1 #ifndef _API_MBX_H 2 #define _API_MBX_H 3 4 #ifdef __cplusplus 5 extern "C" 6 { 7 #endif 8 9 #include "MsTypes.h" 10 11 MBX_Result MApi_MBX_Init(MBX_CPU_ID eHKCPU, MBX_ROLE_ID eHostRole, MS_U32 u32TimeoutMillSecs); 12 MBX_Result MApi_MBX_DeInit(MS_BOOL bForceDiscardPendingMsg); 13 MBX_Result MApi_MBX_RegisterMSG(MBX_Class eMsgClass, MS_U16 u16MsgQueueSize); 14 // MBX_Result MApi_MBX_RegisterMSGWithCallBack(MBX_Class eMsgClass, MS_U16 u16MsgQueueSize, MBX_QUEUE_STATUS_NOTIFY_FUNC notifier); 15 MBX_Result MApi_MBX_RegisterMSGWithCallBack(MBX_Class eMsgClass, MS_U16 u16MsgQueueSize, MBX_MAIL_ARRIVE_NOTIFY_FUNC notifier); 16 MBX_Result MApi_MBX_UnRegisterMSG(MBX_Class eMsgClass, MS_BOOL bForceDiscardMsgQueue); 17 MBX_Result MApi_MBX_ClearMSG(MBX_Class eMsgClass); 18 MBX_Result MApi_MBX_SendMsg(MBX_Msg *pMsg); 19 MBX_Result MApi_MBX_GetMsgQueueStatus(MBX_Class eTargetClass, MBX_MSGQ_Status *pMsgQueueStatus); 20 MBX_Result MApi_MBX_RecvMsg(MBX_Class eTargetClass, MBX_Msg *pMsg, MS_U32 u32WaitMillSecs, MS_U32 u32Flag); 21 // MBX_Result MApi_MBX_CheckMsg(MBX_Class eTargetClass, MBX_Msg *pMsg, MS_U32 u32WaitMillSecs, MS_U32 u32Flag); 22 // MBX_Result MApi_MBX_SendMsgLoopback(MBX_Msg *pMsg, MBX_ROLE_ID eSrcRoleId); 23 MBX_Result MApi_MBX_Enable(MS_BOOL bEnable);//Enable receiving regisited messages in kernel 24 // MBX_Result MApi_MBX_RemoveLatestMsg(void); 25 MBX_Result MApi_MBX_QueryDynamicClass(MBX_ROLE_ID eRoleID, char *name, MS_U8 *pmbx_class); 26 MBX_Result MApi_MBX_GenerateDynamicClass(MBX_ROLE_ID eRoleID, char *name, MS_U8 *pmbx_class); 27 28 #ifdef __cplusplus 29 } 30 #endif 31 32 #endif 33 34