comparison chipsetsw/layer1/cfile/l1_trace.c @ 157:a7f7b52692e2

l1_trace.c: l1_trace_message(): low-hanging fruit
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 05 Jun 2016 18:06:28 +0000
parents 98c25ae2c797
children 90c4afec6608
comparison
equal deleted inserted replaced
156:98c25ae2c797 157:a7f7b52692e2
1023 /* Description: L1 Trace formatting. */ 1023 /* Description: L1 Trace formatting. */
1024 /*-------------------------------------------------------*/ 1024 /*-------------------------------------------------------*/
1025 void l1_trace_message(xSignalHeaderRec *msg) 1025 void l1_trace_message(xSignalHeaderRec *msg)
1026 { 1026 {
1027 1027
1028 char str[240]={0}; // Max 240 bytes with current RVT //omaps00090550 1028 char str[240]; // Max 240 bytes with current RVT
1029 char str2[30]; 1029 char str2[30];
1030 1030
1031 1031
1032 /***********************************************************************/ 1032 /***********************************************************************/
1033 /* Debug messages */ 1033 /* Debug messages */
1598 array_special_cases[index]); 1598 array_special_cases[index]);
1599 } 1599 }
1600 else 1600 else
1601 // big sleep 1601 // big sleep
1602 { 1602 {
1603 char *array_string[]={"undefined","ligth on","uart","sim","gauging","sleep mode","DSP","BT","camera","??"}; 1603 char *array_string[]={"undefined","ligth on","uart","sim","gauging","sleep mode","DSP","BT","??"};
1604 sprintf (str," big sleep: %ld %ld %d %d (cause:%s) %s\n\r", 1604 sprintf (str," big sleep: %ld %ld %d %d (cause:%s) %s\n\r",
1605 ((T_TRACE_INFO *)(msg->SigP))->tab[0], 1605 ((T_TRACE_INFO *)(msg->SigP))->tab[0],
1606 ((T_TRACE_INFO *)(msg->SigP))->tab[1], 1606 ((T_TRACE_INFO *)(msg->SigP))->tab[1],
1607 ((T_TRACE_INFO *)(msg->SigP))->tab[3], 1607 ((T_TRACE_INFO *)(msg->SigP))->tab[3],
1608 ((T_TRACE_INFO *)(msg->SigP))->tab[5], 1608 ((T_TRACE_INFO *)(msg->SigP))->tab[5],
4790 L1_send_trace_cpy(str); 4790 L1_send_trace_cpy(str);
4791 } 4791 }
4792 break; 4792 break;
4793 #endif //FIR 4793 #endif //FIR
4794 4794
4795 #if (L1_AEC == 1) 4795 #if (AEC)
4796 case MMI_AEC_REQ: 4796 case MMI_AEC_REQ:
4797 { 4797 {
4798 #if (L1_NEW_AEC) 4798 #if (L1_NEW_AEC)
4799 sprintf(str,"AEC_R %ld %04lx %04lx %04lx %04lx %04lx %04lx %04lx %04lx %04lx\n\r", 4799 sprintf(str,"AEC_R %ld %04lx %04lx %04lx %04lx %04lx %04lx %04lx %04lx %04lx\n\r",
4800 l1s.actual_time.fn_mod42432, 4800 l1s.actual_time.fn_mod42432,
6093 UWORD16 tcs_program_release; 6093 UWORD16 tcs_program_release;
6094 6094
6095 tcs_program_release = ((T_TST_TEST_HW_CON*)(msg->SigP))->mcu_tcs_program_release; 6095 tcs_program_release = ((T_TST_TEST_HW_CON*)(msg->SigP))->mcu_tcs_program_release;
6096 6096
6097 if (((tcs_program_release & 0xFFF0) == 0x2110) || ((tcs_program_release & 0xFFF0) == 0x2120)) 6097 if (((tcs_program_release & 0xFFF0) == 0x2110) || ((tcs_program_release & 0xFFF0) == 0x2120))
6098 sprintf(str, "TST_C %ld TCS_%x.%x.%x.%x_L1_%x_%x PLUS_N5x DSP:%xh DYN:%xh CHECKSUM:%xh\n\r", 6098 sprintf(str, "TST_C %ld TCS_%d.%d.%d.%d_L1_%x_%x DSP:%xh DYN:%xh CHECKSUM:%xh\n\r",
6099 l1s.actual_time.fn_mod42432, 6099 l1s.actual_time.fn_mod42432,
6100 (tcs_program_release & 0xF000) >> 12, 6100 (tcs_program_release & 0xF000) >> 12,
6101 (tcs_program_release & 0x0F00) >> 8 , 6101 (tcs_program_release & 0x0F00) >> 8 ,
6102 (tcs_program_release & 0x00F0) >> 4 , 6102 (tcs_program_release & 0x00F0) >> 4 ,
6103 tcs_program_release & 0x000F, 6103 tcs_program_release & 0x000F,
6105 ((T_TST_TEST_HW_CON*)(msg->SigP))->mcu_tcs_internal, 6105 ((T_TST_TEST_HW_CON*)(msg->SigP))->mcu_tcs_internal,
6106 ((T_TST_TEST_HW_CON*)(msg->SigP))->dsp_code_version, 6106 ((T_TST_TEST_HW_CON*)(msg->SigP))->dsp_code_version,
6107 ((T_TST_TEST_HW_CON*)(msg->SigP))->dsp_patch_version, 6107 ((T_TST_TEST_HW_CON*)(msg->SigP))->dsp_patch_version,
6108 ((T_TST_TEST_HW_CON*)(msg->SigP))->dsp_checksum); 6108 ((T_TST_TEST_HW_CON*)(msg->SigP))->dsp_checksum);
6109 else 6109 else
6110 sprintf(str, "TST_C %ld TCS_%x.%x.%x_L1_%x_%x PLUS_N5x DSP:%xh DYN:%xh CHECKSUM:%xh\n\r", 6110 sprintf(str, "TST_C %ld TCS_%x.%x.%x_L1_%x_%x DSP:%xh DYN:%xh CHECKSUM:%xh\n\r",
6111 l1s.actual_time.fn_mod42432, 6111 l1s.actual_time.fn_mod42432,
6112 (tcs_program_release & 0xF000) >> 12, 6112 (tcs_program_release & 0xF000) >> 12,
6113 (tcs_program_release & 0x0F00) >> 8 , 6113 (tcs_program_release & 0x0F00) >> 8 ,
6114 tcs_program_release & 0x00FF, 6114 tcs_program_release & 0x00FF,
6115 ((T_TST_TEST_HW_CON*)(msg->SigP))->mcu_tcs_official, 6115 ((T_TST_TEST_HW_CON*)(msg->SigP))->mcu_tcs_official,
8028 array_special_cases[index]); 8028 array_special_cases[index]);
8029 } 8029 }
8030 else 8030 else
8031 // big sleep 8031 // big sleep
8032 { 8032 {
8033 char *array_string[]={"undefined","ligth on","uart","sim","gauging","sleep mode","DSP","BT","camera","??"}; 8033 char *array_string[]={"undefined","ligth on","uart","sim","gauging","sleep mode","DSP","BT","??"};
8034 sprintf (str," big sleep: %ld %ld %d %d (cause:%s) %s\n\r", 8034 sprintf (str," big sleep: %ld %ld %d %d (cause:%s) %s\n\r",
8035 start_fn, 8035 start_fn,
8036 end_fn, 8036 end_fn,
8037 wakeup_type, 8037 wakeup_type,
8038 int_id, 8038 int_id,