| #ifdef L1_CATCHER |
| |
| //#include "TrcMod.h" |
| #include "L1Trc.h" |
| #include "kal_general_types.h" |
| |
| /****************/ |
| /* Filter array */ |
| /****************/ |
| unsigned char L1Audio_Trace_Filter[5] = |
| { 0x1, 0x3, 0x0, 0x0, 0x0 }; |
| /***********************/ |
| /* Set filter function */ |
| /***********************/ |
| void Set_L1Audio_Filter(unsigned char *setting) |
| { |
| int i; |
| |
| for(i=0; i<5; i++) |
| L1Audio_Trace_Filter[i] = setting[i]; |
| } |
| |
| /****************************************/ |
| /* Function definition for each Message */ |
| /****************************************/ |
| /* L1Audio_Msg_AFE_Switch */ |
| void L1TRC_Send_L1Audio_Msg_AFE_Switch(unsigned char v1, unsigned char v2) |
| { |
| TRC_START_FILL_TASK(4); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x40); |
| TRC_MAKE_CHAR_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_MAKE_CHAR_3c(TRC_TASK_BUFFER, TRC_LOCAL, v2); |
| TRC_END_FILL_TASK_2w; |
| } |
| |
| /* L1Audio_Msg_AFE_TurnSpk */ |
| void L1TRC_Send_L1Audio_Msg_AFE_TurnSpk(unsigned char v1, unsigned char v2) |
| { |
| TRC_START_FILL_TASK(4); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x41); |
| TRC_MAKE_CHAR_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_MAKE_CHAR_3c(TRC_TASK_BUFFER, TRC_LOCAL, v2); |
| TRC_END_FILL_TASK_2w; |
| } |
| |
| /* L1Audio_Msg_AFE_TurnMIC */ |
| void L1TRC_Send_L1Audio_Msg_AFE_TurnMIC(unsigned char v1, unsigned char v2) |
| { |
| TRC_START_FILL_TASK(4); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x42); |
| TRC_MAKE_CHAR_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_MAKE_CHAR_3c(TRC_TASK_BUFFER, TRC_LOCAL, v2); |
| TRC_END_FILL_TASK_2w; |
| } |
| |
| /* L1Audio_Msg_AFE_TurnFIR */ |
| void L1TRC_Send_L1Audio_Msg_AFE_TurnFIR(unsigned char v1, unsigned char v2) |
| { |
| TRC_START_FILL_TASK(4); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x43); |
| TRC_MAKE_CHAR_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_MAKE_CHAR_3c(TRC_TASK_BUFFER, TRC_LOCAL, v2); |
| TRC_END_FILL_TASK_2w; |
| } |
| |
| /* L1Audio_Msg_AFE_SetInput */ |
| void L1TRC_Send_L1Audio_Msg_AFE_SetInput(char v1) |
| { |
| TRC_START_FILL_TASK(3); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x44); |
| TRC_MAKE_CHAR_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_PAD_CHAR(0xFA); |
| TRC_END_FILL_TASK_2w; |
| } |
| |
| /* L1Audio_Msg_AFE_MicVolume */ |
| void L1TRC_Send_L1Audio_Msg_AFE_MicVolume(unsigned char v1) |
| { |
| TRC_START_FILL_TASK(3); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x45); |
| TRC_MAKE_CHAR_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_PAD_CHAR(0xFA); |
| TRC_END_FILL_TASK_2w; |
| } |
| |
| /* L1Audio_Msg_AFE_StVolume */ |
| void L1TRC_Send_L1Audio_Msg_AFE_StVolume(unsigned char v1) |
| { |
| TRC_START_FILL_TASK(3); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x46); |
| TRC_MAKE_CHAR_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_PAD_CHAR(0xFA); |
| TRC_END_FILL_TASK_2w; |
| } |
| |
| /* L1Audio_Msg_AFE_EcParam */ |
| void L1TRC_Send_L1Audio_Msg_AFE_EcParam(short v1, short v2) |
| { |
| TRC_START_FILL_TASK(6); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x47); |
| TRC_MAKE_SHORT_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_MAKE_SHORT_0c(TRC_TASK_BUFFER, TRC_LOCAL, v2); |
| TRC_PAD_SHORT(0xFAFA); |
| TRC_END_FILL_TASK_3w; |
| } |
| |
| /* L1Audio_Msg_AFE_SetDevice */ |
| void L1TRC_Send_L1Audio_Msg_AFE_SetDevice(unsigned char v1, char v2) |
| { |
| TRC_START_FILL_TASK(4); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x48); |
| TRC_MAKE_CHAR_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_MAKE_CHAR_3c(TRC_TASK_BUFFER, TRC_LOCAL, v2); |
| TRC_END_FILL_TASK_2w; |
| } |
| |
| /* L1Audio_Msg_AFE_SetVolume */ |
| void L1TRC_Send_L1Audio_Msg_AFE_SetVolume(unsigned char v1, unsigned char v2, unsigned char v3) |
| { |
| TRC_START_FILL_TASK(5); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x49); |
| TRC_MAKE_CHAR_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_MAKE_CHAR_3c(TRC_TASK_BUFFER, TRC_LOCAL, v2); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, v3); |
| TRC_PAD_FN(0xFAFAFA); |
| TRC_END_FILL_TASK_3w; |
| } |
| |
| /* L1Audio_Msg_AFE_SpkSelect */ |
| void L1TRC_Send_L1Audio_Msg_AFE_SpkSelect(short v1, short v2, short v3, short v4, short v5) |
| { |
| TRC_START_FILL_TASK(12); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x4A); |
| TRC_MAKE_SHORT_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_MAKE_SHORT_0c(TRC_TASK_BUFFER, TRC_LOCAL, v2); |
| TRC_MAKE_SHORT_2c(TRC_TASK_BUFFER, TRC_LOCAL, v3); |
| TRC_MAKE_SHORT_0c(TRC_TASK_BUFFER, TRC_LOCAL, v4); |
| TRC_MAKE_SHORT_2c(TRC_TASK_BUFFER, TRC_LOCAL, v5); |
| TRC_END_FILL_TASK_4w; |
| } |
| |
| /* L1Audio_Msg_AFE_Gain */ |
| void L1TRC_Send_L1Audio_Msg_AFE_Gain(unsigned short v1, unsigned short v2, short v3) |
| { |
| TRC_START_FILL_TASK(8); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x4B); |
| TRC_MAKE_SHORT_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_MAKE_SHORT_0c(TRC_TASK_BUFFER, TRC_LOCAL, v2); |
| TRC_MAKE_SHORT_2c(TRC_TASK_BUFFER, TRC_LOCAL, v3); |
| TRC_END_FILL_TASK_3w; |
| } |
| |
| /* L1Audio_Msg_AM_Switch */ |
| void L1TRC_Send_L1Audio_Msg_AM_Switch(unsigned char v1, unsigned char v2) |
| { |
| TRC_START_FILL_TASK(4); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x4C); |
| TRC_MAKE_CHAR_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_MAKE_CHAR_3c(TRC_TASK_BUFFER, TRC_LOCAL, v2); |
| TRC_END_FILL_TASK_2w; |
| } |
| |
| /* L1Audio_Msg_AM_Handover */ |
| void L1TRC_Send_L1Audio_Msg_AM_Handover(char v1) |
| { |
| TRC_START_FILL_TASK(3); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x4D); |
| TRC_MAKE_CHAR_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_PAD_CHAR(0xFA); |
| TRC_END_FILL_TASK_2w; |
| } |
| |
| /* L1Audio_Msg_AM_IO_Switch */ |
| void L1TRC_Send_L1Audio_Msg_AM_IO_Switch(unsigned char v1) |
| { |
| TRC_START_FILL_TASK(3); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x4E); |
| TRC_MAKE_CHAR_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_PAD_CHAR(0xFA); |
| TRC_END_FILL_TASK_2w; |
| } |
| |
| /* L1Audio_Msg_AM_SetSpeech */ |
| void L1TRC_Send_L1Audio_Msg_AM_SetSpeech(unsigned char v1, unsigned char v2) |
| { |
| TRC_START_FILL_TASK(4); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x4F); |
| TRC_MAKE_CHAR_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_MAKE_CHAR_3c(TRC_TASK_BUFFER, TRC_LOCAL, v2); |
| TRC_END_FILL_TASK_2w; |
| } |
| |
| /* L1Audio_Msg_Speech_State */ |
| void L1TRC_Send_L1Audio_Msg_Speech_State(unsigned char v1) |
| { |
| TRC_START_FILL_TASK(3); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x50); |
| TRC_MAKE_CHAR_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_PAD_CHAR(0xFA); |
| TRC_END_FILL_TASK_2w; |
| } |
| |
| /* L1Audio_Msg_DSP_INT */ |
| void L1TRC_Send_L1Audio_Msg_DSP_INT(unsigned short v1) |
| { |
| TRC_START_FILL_TASK(4); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x51); |
| TRC_MAKE_SHORT_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_END_FILL_TASK_2w; |
| } |
| |
| /* L1Audio_Msg_AM_DELAY_TABLE */ |
| void L1TRC_Send_L1Audio_Msg_AM_DELAY_TABLE(short v1) |
| { |
| TRC_START_FILL_TASK(4); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x52); |
| TRC_MAKE_SHORT_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_END_FILL_TASK_2w; |
| } |
| |
| /* L1Audio_Msg_SPEECH_FRAME */ |
| void L1TRC_Send_L1Audio_Msg_SPEECH_FRAME(unsigned char v1, unsigned char v2, unsigned char v3) |
| { |
| TRC_START_FILL_TASK(5); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x53); |
| TRC_MAKE_CHAR_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_MAKE_CHAR_3c(TRC_TASK_BUFFER, TRC_LOCAL, v2); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, v3); |
| TRC_PAD_FN(0xFAFAFA); |
| TRC_END_FILL_TASK_3w; |
| } |
| |
| /* L1Audio_Msg_SPEECH_CODEC */ |
| void L1TRC_Send_L1Audio_Msg_SPEECH_CODEC(unsigned char v1, unsigned char v2) |
| { |
| TRC_START_FILL_TASK(4); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x54); |
| TRC_MAKE_CHAR_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_MAKE_CHAR_3c(TRC_TASK_BUFFER, TRC_LOCAL, v2); |
| TRC_END_FILL_TASK_2w; |
| } |
| |
| /* L1Audio_Msg_VM_DEBUG */ |
| void L1TRC_Send_L1Audio_Msg_VM_DEBUG(unsigned short v1, unsigned short v2, unsigned short v3) |
| { |
| TRC_START_FILL_TASK(8); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x55); |
| TRC_MAKE_SHORT_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_MAKE_SHORT_0c(TRC_TASK_BUFFER, TRC_LOCAL, v2); |
| TRC_MAKE_SHORT_2c(TRC_TASK_BUFFER, TRC_LOCAL, v3); |
| TRC_END_FILL_TASK_3w; |
| } |
| |
| /* L1Audio_Msg_VBI_RESET */ |
| void L1TRC_Send_L1Audio_Msg_VBI_RESET(void) |
| { |
| TRC_START_FILL_TASK(2); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x56); |
| TRC_PAD_SHORT(0xFAFA); |
| TRC_END_FILL_TASK_2w; |
| } |
| |
| /* L1Audio_Msg_TCH_NOTIFY */ |
| void L1TRC_Send_L1Audio_Msg_TCH_NOTIFY(unsigned char v1, unsigned char v2) |
| { |
| TRC_START_FILL_TASK(4); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x57); |
| TRC_MAKE_CHAR_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_MAKE_CHAR_3c(TRC_TASK_BUFFER, TRC_LOCAL, v2); |
| TRC_END_FILL_TASK_2w; |
| } |
| |
| /* L1Audio_Msg_INTERRAT_W2G */ |
| void L1TRC_Send_L1Audio_Msg_INTERRAT_W2G(void) |
| { |
| TRC_START_FILL_TASK(2); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x58); |
| TRC_PAD_SHORT(0xFAFA); |
| TRC_END_FILL_TASK_2w; |
| } |
| |
| /* L1Audio_Msg_INTERRAT_G2W */ |
| void L1TRC_Send_L1Audio_Msg_INTERRAT_G2W(void) |
| { |
| TRC_START_FILL_TASK(2); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x59); |
| TRC_PAD_SHORT(0xFAFA); |
| TRC_END_FILL_TASK_2w; |
| } |
| |
| /* L1Audio_Msg_SWITCH_FILT */ |
| void L1TRC_Send_L1Audio_Msg_SWITCH_FILT(short v1, unsigned short v2) |
| { |
| TRC_START_FILL_TASK(6); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x5A); |
| TRC_MAKE_SHORT_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_MAKE_SHORT_0c(TRC_TASK_BUFFER, TRC_LOCAL, v2); |
| TRC_PAD_SHORT(0xFAFA); |
| TRC_END_FILL_TASK_3w; |
| } |
| |
| /* L1Audio_Msg_AFE_RegBackup */ |
| void L1TRC_Send_L1Audio_Msg_AFE_RegBackup(unsigned char v1) |
| { |
| TRC_START_FILL_TASK(3); |
| TRC_MAKE_CHAR_0c(TRC_TASK_BUFFER, TRC_LOCAL, 0xF0); |
| TRC_MAKE_CHAR_1c(TRC_TASK_BUFFER, TRC_LOCAL, 0x5B); |
| TRC_MAKE_CHAR_2c(TRC_TASK_BUFFER, TRC_LOCAL, v1); |
| TRC_PAD_CHAR(0xFA); |
| TRC_END_FILL_TASK_2w; |
| } |
| |
| #endif |