d74c070447c14a79e65c15493f9f2ef685fbceea
[processor-sdk/performance-audio-sr.git] / processor_audio_sdk_1_00_00_00 / pasdk / test_dsp / framework / aspMsg_master.h
1 #ifndef _ASP_MSG_MASTER_H_
2 #define _ASP_MSG_MASTER_H_
4 #include <xdc/std.h>
5 #include <ti/sysbios/heaps/HeapBuf.h>
6 #include <ti/ipc/MessageQ.h>
8 #define ASP_MSG_MASTER_SOK ( 0 )
9 #define ASP_MSG_MASTER_HEAPBUF_CREATE_FAIL ( -1 )
10 #define ASP_MSG_MASTER_MSGQ_REGHEAP_FAIL ( -2 )
11 #define ASP_MSG_MASTER_MASTER_MSGQ_CREATE_FAIL ( -3 )
12 #define ASP_MSG_MASTER_SLAVE_MSGQ_OPEN_FAIL ( -4 )
14 #define ASP_MSG_MASTER_DEF_NUMMSGS ( 4 )
16 /* module structure */
17 typedef struct AspMsgMaster_Module
18 {
19 UInt16 masterProcId; // master processor id
20 UInt16 slaveProcId; // slave processor id
21 MessageQ_Handle masterQue; // created locally
22 MessageQ_QueueId slaveQue; // opened remotely
23 UInt16 heapId; // MessageQ heapId
24 HeapBuf_Handle heap; // message heap
25 Int msgSize; // aligned size of message
26 Int poolSize; // size of message pool
27 Ptr store; // memory store for message pool
28 UInt32 messageId; // MS bit: reply bit, LS 31 bits: message id
29 } AspMsgMaster_Module;
31 /* module handle */
32 typedef AspMsgMaster_Module * AspMsgMaster_Handle;
34 /* Initialize ASP master messaging */
35 Int AspMsgMaster_init(
36 AspMsgMaster_Handle hAspMsgMaster,
37 UInt16 remoteProcId,
38 UInt16 numMsgs
39 );
41 extern AspMsgMaster_Handle hAspMsgMaster;
45 #endif /* _ASP_MSG_MASTER_H_ */