?? aud_dsp_am_reply.cc
字號:
/* (c) Copyright Motorola 1998, All rights reserved. Motorola Confidential Proprietary Contains confidential proprietary information of Motorola, Inc. Reverse engineering is prohibited. The copyright notice does not imply publication. DESCRIPTION: <file description> *************** REVISION HISTORY ********************************************* Date Author Reference ======== ======== ========================== 00-08-09 mtaraba CR - CSGce55882 Eliminate file gsm.h from audio manager 00-04-05 hchuang CR - CSGce53807 Update Audio Manager to use HAPI MDI functions and header files - remove #define api_queue since it's defined in AUD_DSP_AM_Reply.H 99-12-14 ktang CR - CSGce42434 Common Tone Generator - File creation - Modified function parse_primitive, and moved it in from .H *//************** INCLUDES ******************************************************/#include <SUAPI/suapi.h>#include <audio/AUD_DSP_AM_Reply.H>/************** LOCAL CONSTANTS ***********************************************//************** LOCAL STRUCTURES, ENUMS, AND TYPEDEFS *************************//************** LOCAL FUNCTION PROTOTYPES *************************************//************** LOCAL MACROS **************************************************//************** LOCAL VARIABLES ***********************************************//************** FUNCTION DEFINITIONS ******************************************//* DESCRIPTION: Constructor INPUTS: Received primitive body OUTPUTS: None IMPORTANT NOTES: None */AUD_DSP_Reply_RX :: AUD_DSP_Reply_RX(void *msg){ msg_id = TD_DSP_AUD_REPLY_BUFF_INVALID; next_msg_pos = (AUD_DSP_REPLY_WORD*)msg; primitive_data_ptr = msg;}/* DESCRIPTION: This function moves the pointer primitive_data_ptr to the next message body in the primitive body. As definition here, a primitve contains 0 to multiple messages in its body; where each message contains a message header and a message body. Refer MDI documents for message formats. INPUTS: None OUTPUTS: TRUE - if there is such one in the primitive body FALSE - if there is no (more) messages in the primitive body IMPORTANT NOTES: After parsing, primitive_data_ptr points to the body of the message, not the header.*/BOOL AUD_DSP_Reply_RX :: parse_message(void){ BOOL stat = FALSE; msg_id = *next_msg_pos; // The boundry checking protection assumes that when the messages are written // to MDI, if there is no enough room for the whole next message to be written, // this next message is not to be written if (msg_id != TD_DSP_AUD_REPLY_BUFF_INVALID && (next_msg_pos - (UINT16*)primitive_data_ptr) < DSP_MCU_AUDIO_REPLY_WORD_SIZE) { UINT8 msg_len = AUD_DSP_REPLY_get_msg_len(next_msg_pos[AUD_DSP_REPLY_MSG_LEN_INDEX]); primitive_data_ptr = next_msg_pos; next_msg_pos += msg_len + AUD_DSP_REPLY_MSG_HEADER_LEN; stat = TRUE; } return stat;}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -