#ifndef _ASP_MSG_COMMON_H_ #define _ASP_MSG_COMMON_H_ #include #include #include /* round up the value 'size' to the next 'align' boundary */ #define ROUNDUP(size, align) \ (UInt32)(((UInt32)(size) + ((UInt32)(align) - 1)) & ~((UInt32)(align) - 1)) #define MASTER_NAME ( "CORE0" ) // DSP is MASTER #define SLAVE_NAME ( "HOST" ) // ARM is SLAVE #define AspMsg_MasterMsgQueName ( "MASTER:MsgQ:01" ) #define AspMsg_SlaveMsgQueName ( "%s:MsgQ:01" ) /* %s is each slave's Proc Name */ // ASP (Master-To-)Slave Commands typedef enum ASP_Slave_Cmd { ASP_SLAVE_NULL, // 0 ASP_SLAVE_START, // 1 ASP_SLAVE_EXIT, // 2 ASP_SLAVE_DEC_SOURCE_SELECT, // 3 ASP_SLAVE_DEC_EXIT, // 4 ASP_SLAVE_DEC_CONTROL, // 5 ASP_SLAVE_DEC_ACTIVATE, // 6 ASP_SLAVE_DEC_RESET, // 7 ASP_SLAVE_DEC_INFO, // 8 ASP_SLAVE_DEC_DECODE, // 9 ASP_SLAVE_DEC_DEACTIVATE, // 10 ASP_SLAVE_NCOMMANDS // 11 } ASP_Slave_Cmd; // ASP (Slave-To-)Master Commands typedef enum ASP_Master_Cmd { ASP_MASTER_NULL = ASP_SLAVE_NCOMMANDS, // 11 ASP_MASTER_START_DONE, // 12 ASP_MASTER_EXIT_DONE, // 13 ASP_MASTER_DEC_SOURCE_SELECT_DONE, // 14 ASP_MASTER_DEC_EXIT_DONE, // 15 ASP_MASTER_DEC_CONTROL_DONE, // 16 ASP_MASTER_DEC_ACTIVATE_DONE, // 17 ASP_MASTER_DEC_RESET_DONE, // 18 ASP_MASTER_DEC_INFO_DONE, // 19 // temp ASP_MASTER_DEC_DECODE_DONE, // 20 // temp ASP_MASTER_DEC_DEACTIVATE_DONE // 21 } ASP_Master_Cmd; // ASP Message typedef struct ASP_Msg { MessageQ_MsgHeader reserved; UInt32 cmd; // command UInt16 procId; // processor Id of sender Uint16 expectResp; // whether response expected from receiver + align buf to 32-bit boundary UInt32 messageId; // MB bit: response bit, LS 31 bits: message Id Char buf[32]; // buffer for message parameters } ASP_Msg; #endif /* _ASP_MSG_COMMON_H_ */