FreeCalypso > hg > tcs211-l1-reconst
annotate chipsetsw/layer1/tm_cust0/l1tm_cust.c @ 245:bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 16 Jan 2017 01:37:37 +0000 |
parents | e92a17fee1c1 |
children | 03c8cdc20ffa |
rev | line source |
---|---|
245
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1 /************* Revision Controle System Header ************* |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2 * GSM Layer 1 software |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
3 * L1TM_CUST.C |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
4 * |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
5 * Filename %M% |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
6 * Version %I% |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
7 * Date %G% |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
8 * |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
9 ************* Revision Controle System Header *************/ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
10 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
11 #include "l1_confg.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
12 #if TESTMODE |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
13 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
14 #include "tm_defs.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
15 #include "l1_const.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
16 #include "l1_types.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
17 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
18 #include "l1tm_defty.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
19 #include "l1tm_cust.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
20 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
21 #if (AUDIO_TASK == 1) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
22 #include "l1audio_const.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
23 #include "l1audio_cust.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
24 #include "l1audio_defty.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
25 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
26 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
27 #if (L1_GTT == 1) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
28 #include "l1gtt_const.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
29 #include "l1gtt_defty.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
30 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
31 #include "l1_defty.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
32 #include "l1_msgty.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
33 #include "l1_tabs.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
34 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
35 #include "l1tm_msgty.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
36 #include "l1tm_varex.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
37 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
38 #include "abb.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
39 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
40 #if (RF==35) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
41 #include "tpudrv35.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
42 #include "l1_rf35.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
43 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
44 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
45 #if (RF==12) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
46 #include "tpudrv12.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
47 #include "l1_rf12.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
48 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
49 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
50 #if (RF==10) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
51 #include "tpudrv10.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
52 #include "l1_rf10.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
53 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
54 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
55 #if (RF==8) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
56 #include "tpudrv8.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
57 #include "l1_rf8.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
58 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
59 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
60 #if (RF==2) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
61 #include "l1_rf2.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
62 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
63 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
64 #include <string.h> |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
65 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
66 #include "rvf_api.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
67 #include "Rtc_api.h" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
68 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
69 API voice_a_fir31_downlink[31]={0x4000, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
70 0x0000,0x0000,0x0000,0x0000,0x0000, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
71 0x0000,0x0000,0x0000,0x0000,0x0000, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
72 0x0000,0x0000,0x0000,0x0000,0x0000, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
73 0x0000,0x0000,0x0000,0x0000,0x0000, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
74 0x0000,0x0000,0x0000,0x0000,0x0000, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
75 0x0000,0x0000,0x0000,0x0000,0x0000}; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
76 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
77 API melody_a_fir31_downlink_shipping[31]={0x01BC, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
78 0xFF96, 0x0271, 0xFEFB, 0xFEB5, 0xFD9D, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
79 0x054B, 0x00CF, 0xFF48, 0xF6A1, 0x0357, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
80 0x0761, 0x0C20, 0xEE2D, 0xD721, 0x7620, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
81 0xD721, 0xEE2D, 0x0C20, 0x0761, 0x0357, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
82 0xF6A1, 0xFF48, 0x00CF, 0x054B, 0xFD9D, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
83 0xFEB5, 0xFEFB, 0x0271, 0xFF96, 0x01BC}; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
84 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
85 API melody_a_fir31_downlink_4000[31]={0x4000, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
86 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
87 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
88 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
89 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
90 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
91 0x0000}; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
92 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
93 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
94 // Import band configuration from Flash module (need to replace by an access function) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
95 //extern UWORD8 std; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
96 extern T_L1_CONFIG l1_config; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
97 extern T_RF rf; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
98 extern T_RF_BAND rf_band[GSM_BANDS]; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
99 extern UWORD16 AGC_TABLE[AGC_TABLE_SIZE]; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
100 extern T_ADC adc; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
101 extern T_ADCCAL adc_cal; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
102 extern UWORD16 TM_ul_data[16]; //Uplink data to be stored into ABB Uplink buffer |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
103 extern T_STD_CONFIG std_config[]; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
104 static UWORD8 tm_band = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
105 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
106 //glowing,2004-06-17,import from M188 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
107 extern unsigned char g_pcsyncstatus; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
108 const char * CmdPW = "123456";// must be 1-16 byte,when user use the stw 60 password,we check it,if it is equal with this element, set OpenCmd=1 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
109 unsigned char OpenCmd=0;//when it is 1,we can use those write phone command |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
110 //glowing,2004-06-17,end of import |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
111 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
112 // External function prototypes |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
113 void get_cal_from_nvmem (UWORD8 *ptr, UWORD16 len, UWORD8 id); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
114 UWORD8 save_cal_in_nvmem (UWORD8 *ptr, UWORD16 len, UWORD8 id); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
115 void Cust_init_std(void); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
116 void l1_tpu_init_light(void); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
117 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
118 enum { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
119 TM_RF_ID = 0, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
120 TM_ADC_ID = 1 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
121 }; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
122 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
123 typedef signed char effs_t; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
124 // external FFS function prototypes |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
125 effs_t ffs_mkdir(const char *pathname); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
126 void config_ffs_write(char type); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
127 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
128 /***********************************************************************/ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
129 /* TESTMODE 4.X */ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
130 /***********************************************************************/ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
131 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
132 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
133 /*----------------------------------------------------------*/ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
134 /* Cust_tm_init() */ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
135 /*----------------------------------------------------------*/ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
136 /* Parameters : */ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
137 /* Return : */ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
138 /* Functionality : Init default configuration for TM params */ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
139 /*----------------------------------------------------------*/ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
140 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
141 void Cust_tm_init(void) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
142 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
143 UWORD32 i; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
144 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
145 l1_config.adc_enable = ADC_ENABLE; // ADC readings enabled |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
146 l1_config.agc_enable = AGC_ENABLE; // AGC algo enabled |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
147 l1_config.afc_enable = AFC_ENABLE; // AFC algo enabled |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
148 l1_config.tmode.rf_params.bcch_arfcn = TM_BCCH_ARFCN; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
149 l1_config.tmode.rf_params.tch_arfcn = TM_TCH_ARFCN; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
150 l1_config.tmode.rf_params.mon_arfcn = TM_MON_ARFCN; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
151 l1_config.tmode.rf_params.channel_type = TM_CHAN_TYPE; // TCH_F |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
152 l1_config.tmode.rf_params.subchannel = TM_SUB_CHAN; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
153 l1_config.tmode.rf_params.reload_ramps_flag = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
154 l1_config.tmode.rf_params.tmode_continuous = TM_NO_CONTINUOUS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
155 l1_config.tmode.rx_params.slot_num = TM_SLOT_NUM; // Time Slot |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
156 l1_config.tmode.rx_params.agc = TM_AGC_VALUE; //This may be outside the range of the RF chip used |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
157 l1_config.tmode.rx_params.pm_enable = TM_PM_ENABLE; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
158 l1_config.tmode.rx_params.lna_off = TM_LNA_OFF; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
159 l1_config.tmode.rx_params.number_of_measurements = TM_NUM_MEAS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
160 l1_config.tmode.rx_params.place_of_measurement = TM_WIN_MEAS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
161 l1_config.tmode.tx_params.txpwr = TM_TXPWR; // Min power level for GSM900 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
162 l1_config.tmode.tx_params.txpwr_skip = TM_TXPWR_SKIP; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
163 l1_config.tmode.tx_params.timing_advance = TM_TA; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
164 l1_config.tmode.tx_params.burst_type = TM_BURST_TYPE; // default is normal up-link burst |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
165 l1_config.tmode.tx_params.burst_data = TM_BURST_DATA; // default is all zeros |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
166 l1_config.tmode.tx_params.tsc = TM_TSC; // Training Sequence ("BCC" on BSS) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
167 #if (CODE_VERSION != SIMULATION) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
168 l1_config.tmode.stats_config.num_loops = TM_NUM_LOOPS; // 0 actually means infinite |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
169 #else |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
170 l1_config.tmode.stats_config.num_loops = 4; // 0 actually means infinite |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
171 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
172 l1_config.tmode.stats_config.auto_result_loops = TM_AUTO_RESULT_LOOPS; // 0 actually means infinite |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
173 l1_config.tmode.stats_config.auto_reset_loops = TM_AUTO_RESET_LOOPS; // 0 actually means infinite |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
174 l1_config.tmode.stats_config.stat_type = TM_STAT_TYPE; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
175 l1_config.tmode.stats_config.stat_bitmask = TM_STAT_BITMASK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
176 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
177 #if (CODE_VERSION != SIMULATION) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
178 // Initialize APCDEL1 register of Omega |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
179 ABB_Write_Register_on_page(PAGE0, APCDEL1, (C_APCDEL - 0x0004) >> 6); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
180 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
181 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
182 l1tm.tm_msg_received = FALSE; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
183 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
184 for (i=0;i<16;i++) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
185 TM_ul_data[i]=0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
186 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
187 #if L1_GPRS |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
188 l1_config.tmode.rf_params.pdtch_arfcn = TM_PDTCH_ARFCN; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
189 l1_config.tmode.rf_params.multislot_class = TM_MULTISLOT_CLASS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
190 l1_config.tmode.stats_config.stat_gprs_slots = TM_STAT_GPRS_SLOTS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
191 l1_config.tmode.rx_params.timeslot_alloc = TM_RX_ALLOCATION; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
192 l1_config.tmode.rx_params.coding_scheme = TM_RX_CODING_SCHEME; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
193 l1_config.tmode.tx_params.timeslot_alloc = TM_TX_ALLOCATION; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
194 l1_config.tmode.tx_params.coding_scheme = TM_TX_CODING_SCHEME; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
195 for (i=0; i<8; i++) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
196 l1_config.tmode.tx_params.txpwr_gprs[i] = TM_TXPWR_GPRS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
197 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
198 for (i=0; i<27; i++) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
199 l1_config.tmode.tx_params.rlc_buffer[i] = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
200 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
201 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
202 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
203 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
204 /**********************************************************************/ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
205 /* Test mode functions used for RF calibration */ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
206 /**********************************************************************/ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
207 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
208 void Cust_tm_rf_param_write(T_TM_RETURN *tm_return, WORD16 index, UWORD16 value) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
209 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
210 switch (index) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
211 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
212 case STD_BAND_FLAG: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
213 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
214 UWORD8 std_temp, band_temp; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
215 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
216 std_temp = value & 0xff; // tm_band = b7..0 of value |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
217 band_temp = value >> 8; // band = b15..8 of value |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
218 // get define |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
219 //if (sizeof(std_config)/sizeof(T_STD_CONFIG) <= std_temp) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
220 if (9 <= std_temp) // std max |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
221 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
222 tm_return->status = E_BADINDEX; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
223 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
224 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
225 else if ( GSM_BANDS <= band_temp) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
226 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
227 tm_return->status = E_BADINDEX; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
228 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
229 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
230 else if ( BAND_NONE == std_config[std_temp].band[band_temp]) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
231 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
232 tm_return->status = E_BADINDEX; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
233 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
234 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
235 else |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
236 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
237 l1_config.std.id = std_temp; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
238 tm_band = band_temp; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
239 // update RAM struct with either default or ffs |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
240 Cust_init_std(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
241 l1_tpu_init_light(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
242 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
243 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
244 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
245 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
246 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
247 case INITIAL_AFC_DAC: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
248 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
249 rf.afc.eeprom_afc = (WORD16) value << 3; // shift to put into F13.3 format |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
250 l1_config.params.eeprom_afc = rf.afc.eeprom_afc; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
251 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
252 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
253 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
254 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
255 default: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
256 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
257 tm_return->status = E_BADINDEX; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
258 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
259 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
260 } // end switch |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
261 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
262 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
263 void Cust_tm_rf_param_read(T_TM_RETURN *tm_return, WORD16 index) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
264 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
265 volatile UWORD16 value; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
266 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
267 switch (index) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
268 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
269 case STD_BAND_FLAG: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
270 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
271 value = ((tm_band << 8) | (l1_config.std.id) ); // return global std, tm_band (intel format) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
272 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
273 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
274 case INITIAL_AFC_DAC: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
275 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
276 value = rf.afc.eeprom_afc >> 3; // returned as F13.3 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
277 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
278 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
279 default: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
280 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
281 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
282 tm_return->status = E_BADINDEX; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
283 return; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
284 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
285 } // end switch |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
286 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
287 memcpy(tm_return->result, (UWORD8 *)&value, 2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
288 tm_return->size = 2; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
289 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
290 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
291 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
292 void Cust_tm_rf_table_write(T_TM_RETURN *tm_return, WORD8 index, UWORD8 size, UWORD8 table[]) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
293 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
294 UWORD8 band=0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
295 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
296 tm_return->index = index; // store index before it gets modified |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
297 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
298 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
299 switch (index) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
300 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
301 case RX_AGC_TABLE: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
302 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
303 if (size != sizeof(AGC_TABLE)) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
304 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
305 tm_return->status = E_BADSIZE; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
306 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
307 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
308 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
309 memcpy(&AGC_TABLE[0], table, size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
310 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
311 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
312 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
313 case AFC_PARAMS: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
314 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
315 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
316 #if (VCXO_ALGO == 1) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
317 if (size != 24) // 4 UWORD32 + 4 WORD16 values |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
318 #else |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
319 if (size != 16) // 4 UWORD32 values |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
320 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
321 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
322 tm_return->status = E_BADSIZE; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
323 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
324 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
325 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
326 memcpy(&rf.afc.psi_sta_inv, table, size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
327 l1_config.params.psi_sta_inv = rf.afc.psi_sta_inv; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
328 l1_config.params.psi_st = rf.afc.psi_st; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
329 l1_config.params.psi_st_32 = rf.afc.psi_st_32; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
330 l1_config.params.psi_st_inv = rf.afc.psi_st_inv; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
331 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
332 #if (CODE_VERSION == NOT_SIMULATION) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
333 #if (VCXO_ALGO == 1) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
334 l1_config.params.afc_dac_center = rf.afc.dac_center; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
335 l1_config.params.afc_dac_min = rf.afc.dac_min; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
336 l1_config.params.afc_dac_max = rf.afc.dac_max; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
337 l1_config.params.afc_snr_thr = rf.afc.snr_thr; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
338 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
339 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
340 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
341 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
342 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
343 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
344 case RX_AGC_GLOBAL_PARAMS: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
345 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
346 if (size != 10) // 5 UWORD16 values |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
347 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
348 tm_return->status = E_BADSIZE; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
349 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
350 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
351 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
352 memcpy(&rf.rx.agc.low_agc_noise_thr, table, size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
353 l1_config.params.low_agc_noise_thr = rf.rx.agc.low_agc_noise_thr; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
354 l1_config.params.high_agc_sat_thr = rf.rx.agc.high_agc_sat_thr; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
355 l1_config.params.low_agc = rf.rx.agc.low_agc; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
356 l1_config.params.high_agc = rf.rx.agc.high_agc; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
357 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
358 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
359 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
360 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
361 case RX_IL_2_AGC_MAX: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
362 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
363 if (size != sizeof(rf.rx.agc.il2agc_max)) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
364 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
365 tm_return->status = E_BADSIZE; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
366 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
367 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
368 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
369 memcpy(&rf.rx.agc.il2agc_max[0], table, size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
370 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
371 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
372 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
373 case RX_IL_2_AGC_PWR: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
374 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
375 if (size != sizeof(rf.rx.agc.il2agc_pwr)) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
376 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
377 tm_return->status = E_BADSIZE; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
378 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
379 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
380 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
381 memcpy(&rf.rx.agc.il2agc_pwr[0], table, size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
382 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
383 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
384 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
385 case RX_IL_2_AGC_AV: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
386 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
387 if (size != sizeof(rf.rx.agc.il2agc_av)) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
388 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
389 tm_return->status = E_BADSIZE; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
390 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
391 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
392 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
393 memcpy(&rf.rx.agc.il2agc_av[0], table, size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
394 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
395 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
396 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
397 case TX_LEVELS: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
398 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
399 if (size != sizeof(rf_band[tm_band].tx.levels)) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
400 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
401 tm_return->status = E_BADSIZE; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
402 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
403 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
404 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
405 memcpy(&rf_band[tm_band].tx.levels[0], table, size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
406 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
407 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
408 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
409 case TX_CAL_CHAN: // generic for all bands |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
410 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
411 if (size != sizeof(rf_band[tm_band].tx.chan_cal_table)) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
412 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
413 tm_return->status = E_BADSIZE; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
414 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
415 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
416 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
417 memcpy(&rf_band[tm_band].tx.chan_cal_table[0][0], table, size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
418 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
419 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
420 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
421 case TX_CAL_TEMP: // generic for all bands |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
422 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
423 if (size != sizeof(rf_band[tm_band].tx.temp)) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
424 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
425 tm_return->status = E_BADSIZE; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
426 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
427 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
428 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
429 memcpy(&rf_band[tm_band].tx.temp[0], table, size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
430 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
431 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
432 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
433 case RX_CAL_CHAN: // generic for all bands |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
434 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
435 if (size != sizeof(rf_band[tm_band].rx.agc_bands)) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
436 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
437 tm_return->status = E_BADSIZE; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
438 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
439 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
440 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
441 memcpy(&rf_band[tm_band].rx.agc_bands[0], table, size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
442 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
443 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
444 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
445 case RX_CAL_TEMP: // generic for all bands |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
446 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
447 if (size != sizeof(rf_band[tm_band].rx.temp)) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
448 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
449 tm_return->status = E_BADSIZE; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
450 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
451 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
452 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
453 memcpy(&rf_band[tm_band].rx.temp[0], table, size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
454 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
455 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
456 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
457 case RX_AGC_PARAMS: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
458 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
459 if (size != sizeof(rf_band[tm_band].rx.rx_cal_params)) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
460 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
461 tm_return->status = E_BADSIZE; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
462 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
463 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
464 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
465 memcpy(&rf_band[tm_band].rx.rx_cal_params, table, size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
466 if (tm_band == 0) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
467 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
468 l1_config.std.g_magic_band1 = rf_band[tm_band].rx.rx_cal_params.g_magic; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
469 l1_config.std.lna_att_band1 = rf_band[tm_band].rx.rx_cal_params.lna_att; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
470 l1_config.std.lna_switch_thr_low_band1 = rf_band[tm_band].rx.rx_cal_params.lna_switch_thr_low; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
471 l1_config.std.lna_switch_thr_high_band1 = rf_band[tm_band].rx.rx_cal_params.lna_switch_thr_high; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
472 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
473 else if (tm_band == 1) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
474 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
475 l1_config.std.g_magic_band2 = rf_band[tm_band].rx.rx_cal_params.g_magic; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
476 l1_config.std.lna_att_band2 = rf_band[tm_band].rx.rx_cal_params.lna_att; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
477 l1_config.std.lna_switch_thr_low_band2 = rf_band[tm_band].rx.rx_cal_params.lna_switch_thr_low; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
478 l1_config.std.lna_switch_thr_high_band2 = rf_band[tm_band].rx.rx_cal_params.lna_switch_thr_high; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
479 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
480 else |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
481 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
482 tm_return->status = E_INVAL; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
483 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
484 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
485 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
486 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
487 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
488 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
489 case TX_CAL_EXTREME: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
490 case RX_CAL_LEVEL: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
491 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
492 tm_return->status = E_NOSUBSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
493 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
494 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
495 #if L1_GPRS |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
496 case RLC_TX_BUFFER_CS1: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
497 case RLC_TX_BUFFER_CS2: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
498 case RLC_TX_BUFFER_CS3: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
499 case RLC_TX_BUFFER_CS4: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
500 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
501 UWORD8 i, buffer_size; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
502 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
503 tm_return->index = index; // store index before it gets modified |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
504 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
505 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
506 buffer_size = size/2 + size%2; // bytes will be concatenated into UWORD16 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
507 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
508 if (buffer_size > 27) //max. number of data bytes |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
509 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
510 tm_return->status = E_BADSIZE; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
511 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
512 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
513 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
514 // make sure that last byte is zero in case of odd number of bytes |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
515 table[size] = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
516 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
517 // init the whole buffer before downloading new data |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
518 for (i=0; i<27; i++) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
519 l1_config.tmode.tx_params.rlc_buffer[i] = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
520 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
521 for (i=0; i<buffer_size; i++) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
522 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
523 l1_config.tmode.tx_params.rlc_buffer[i] = (table[2*i+1] << 8) | table[2*i]; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
524 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
525 l1_config.tmode.tx_params.rlc_buffer_size = buffer_size; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
526 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
527 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
528 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
529 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
530 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
531 case TX_DATA_BUFFER: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
532 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
533 UWORD8 i; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
534 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
535 tm_return->index = index; // store index before it gets modified |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
536 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
537 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
538 if (size != 32) // 16 UWORD16 (containing 10 data bits each) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
539 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
540 tm_return->status = E_BADSIZE; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
541 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
542 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
543 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
544 memcpy(&TM_ul_data, table, size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
545 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
546 for (i=0; i<16; i++) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
547 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
548 TM_ul_data[i] = TM_ul_data[i] << 6; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
549 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
550 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
551 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
552 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
553 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
554 default: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
555 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
556 tm_return->status = E_BADINDEX; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
557 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
558 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
559 } // end switch |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
560 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
561 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
562 void Cust_tm_rf_table_read(T_TM_RETURN *tm_return, WORD8 index) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
563 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
564 switch (index) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
565 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
566 case RX_AGC_TABLE: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
567 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
568 tm_return->size = sizeof(AGC_TABLE); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
569 memcpy(tm_return->result, &AGC_TABLE[0], tm_return->size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
570 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
571 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
572 case AFC_PARAMS: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
573 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
574 #if (VCXO_ALGO == 1) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
575 tm_return->size = 24; // 4 UWORD32's + 4 WORD16 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
576 #else |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
577 tm_return->size = 16; // 4 UWORD32's |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
578 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
579 memcpy(tm_return->result, &rf.afc.psi_sta_inv, tm_return->size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
580 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
581 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
582 case RX_AGC_GLOBAL_PARAMS: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
583 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
584 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
585 tm_return->size = 10; // 5 UWORD16's |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
586 memcpy(tm_return->result, &rf.rx.agc.low_agc_noise_thr, tm_return->size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
587 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
588 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
589 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
590 case RX_IL_2_AGC_MAX: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
591 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
592 tm_return->size = sizeof(rf.rx.agc.il2agc_max); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
593 memcpy(tm_return->result, &rf.rx.agc.il2agc_max[0], tm_return->size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
594 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
595 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
596 case RX_IL_2_AGC_PWR: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
597 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
598 tm_return->size = sizeof(rf.rx.agc.il2agc_pwr); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
599 memcpy(tm_return->result, &rf.rx.agc.il2agc_pwr[0], tm_return->size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
600 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
601 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
602 case RX_IL_2_AGC_AV: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
603 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
604 tm_return->size = sizeof(rf.rx.agc.il2agc_av); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
605 memcpy(tm_return->result, &rf.rx.agc.il2agc_av[0], tm_return->size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
606 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
607 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
608 case TX_LEVELS: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
609 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
610 tm_return->size = sizeof(rf_band[tm_band].tx.levels); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
611 memcpy(tm_return->result, &rf_band[tm_band].tx.levels[0], tm_return->size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
612 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
613 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
614 case TX_CAL_CHAN: // generic for all bands |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
615 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
616 tm_return->size = sizeof(rf_band[tm_band].tx.chan_cal_table); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
617 memcpy(tm_return->result, &rf_band[tm_band].tx.chan_cal_table[0][0], tm_return->size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
618 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
619 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
620 case TX_CAL_TEMP: // generic for all bands |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
621 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
622 tm_return->size = sizeof(rf_band[tm_band].tx.temp); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
623 memcpy(tm_return->result, &rf_band[tm_band].tx.temp[0], tm_return->size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
624 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
625 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
626 case RX_CAL_CHAN: // generic for all bands |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
627 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
628 tm_return->size = sizeof(rf_band[tm_band].rx.agc_bands); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
629 memcpy(tm_return->result, &rf_band[tm_band].rx.agc_bands[0], tm_return->size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
630 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
631 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
632 case RX_CAL_TEMP: // generic for all bands |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
633 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
634 tm_return->size = sizeof(rf_band[tm_band].rx.temp); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
635 memcpy(tm_return->result, &rf_band[tm_band].rx.temp[0], tm_return->size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
636 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
637 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
638 case RX_AGC_PARAMS: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
639 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
640 // WARNING: sizeof(rf.rx.rx_cal_params[band]) returns 12 because of alignment |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
641 tm_return->size = 10; // five UWORD16's |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
642 memcpy(tm_return->result, &rf_band[tm_band].rx.rx_cal_params, tm_return->size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
643 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
644 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
645 case TX_CAL_EXTREME: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
646 case RX_CAL_LEVEL: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
647 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
648 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
649 tm_return->status = E_NOSUBSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
650 return; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
651 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
652 #if L1_GPRS |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
653 case RLC_TX_BUFFER_CS1: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
654 case RLC_TX_BUFFER_CS2: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
655 case RLC_TX_BUFFER_CS3: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
656 case RLC_TX_BUFFER_CS4: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
657 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
658 tm_return->size = l1_config.tmode.tx_params.rlc_buffer_size * 2; // UWORD16's |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
659 memcpy(tm_return->result, &l1_config.tmode.tx_params.rlc_buffer[0], tm_return->size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
660 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
661 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
662 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
663 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
664 case TX_DATA_BUFFER: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
665 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
666 tm_return->size = 32; //16*UWORD16 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
667 memcpy(tm_return->result, &TM_ul_data[0], tm_return->size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
668 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
669 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
670 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
671 #if (RF==35) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
672 case RX_PLL_TUNING_TABLE: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
673 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
674 tm_return->size = sizeof(pll_tuning); //6*UWORD16 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
675 memcpy(tm_return->result, &pll_tuning, tm_return->size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
676 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
677 pll_tuning.enable = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
678 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
679 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
680 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
681 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
682 default: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
683 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
684 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
685 tm_return->status = E_BADINDEX; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
686 return; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
687 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
688 } // end switch |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
689 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
690 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
691 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
692 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
693 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
694 void Cust_tm_rx_param_write(T_TM_RETURN *tm_return, WORD16 index, UWORD16 value) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
695 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
696 switch (index) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
697 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
698 case RX_FRONT_DELAY: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
699 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
700 //delay for dual band not implemented yet |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
701 rf.tx.prg_tx = value; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
702 l1_config.params.prg_tx_gsm = rf.tx.prg_tx; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
703 l1_config.params.prg_tx_dcs = rf.tx.prg_tx; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
704 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
705 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
706 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
707 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
708 default: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
709 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
710 tm_return->status = E_BADINDEX; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
711 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
712 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
713 } // end switch |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
714 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
715 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
716 void Cust_tm_rx_param_read(T_TM_RETURN *tm_return, WORD16 index) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
717 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
718 volatile UWORD16 value; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
719 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
720 switch (index) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
721 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
722 case RX_FRONT_DELAY: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
723 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
724 value = rf.tx.prg_tx; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
725 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
726 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
727 default: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
728 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
729 tm_return->status = E_BADINDEX; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
730 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
731 return; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
732 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
733 } // end switch |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
734 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
735 memcpy(tm_return->result, (UWORD8 *)&value, 2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
736 tm_return->size = 2; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
737 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
738 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
739 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
740 void Cust_tm_tx_param_write(T_TM_RETURN *tm_return, WORD16 index, UWORD16 value, UWORD8 band) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
741 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
742 switch (index) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
743 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
744 case TX_APC_DAC: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
745 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
746 // generic for all bands |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
747 rf_band[tm_band].tx.levels[l1_config.tmode.tx_params.txpwr].apc = value; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
748 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
749 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
750 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
751 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
752 case TX_RAMP_TEMPLATE: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
753 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
754 if (value >= sizeof(rf_band[tm_band].tx.ramp_tables)/sizeof(rf_band[tm_band].tx.ramp_tables[0])) // [0..15] |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
755 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
756 tm_return->status = E_INVAL; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
757 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
758 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
759 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
760 // generic for all bands |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
761 rf_band[tm_band].tx.levels[l1_config.tmode.tx_params.txpwr].ramp_index = value; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
762 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
763 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
764 l1_config.tmode.rf_params.reload_ramps_flag = 1; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
765 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
766 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
767 case TX_CHAN_CAL_TABLE: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
768 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
769 if (value >= sizeof(rf_band[tm_band].tx.chan_cal_table)/sizeof(rf_band[tm_band].tx.chan_cal_table[0])) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
770 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
771 tm_return->status = E_INVAL; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
772 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
773 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
774 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
775 // generic for all bands |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
776 rf_band[tm_band].tx.levels[l1_config.tmode.tx_params.txpwr].chan_cal_index = value; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
777 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
778 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
779 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
780 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
781 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
782 case TX_BURST_TYPE: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
783 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
784 if (value > 1) // [0..1] |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
785 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
786 tm_return->status = E_INVAL; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
787 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
788 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
789 l1_config.tmode.tx_params.burst_type = value; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
790 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
791 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
792 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
793 case TX_BURST_DATA: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
794 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
795 // range is [0..10], but we only support [0..2] and [5..13] at the moment |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
796 if ((value > 2 && value < 5) || (value > 13)) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
797 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
798 tm_return->status = E_INVAL; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
799 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
800 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
801 l1_config.tmode.tx_params.burst_data = value; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
802 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
803 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
804 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
805 case TX_TRAINING_SEQ: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
806 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
807 if (value > 7) // [0..7] |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
808 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
809 tm_return->status = E_INVAL; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
810 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
811 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
812 l1_config.tmode.tx_params.tsc = value; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
813 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
814 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
815 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
816 default: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
817 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
818 tm_return->status = E_BADINDEX; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
819 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
820 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
821 } // end switch |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
822 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
823 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
824 void Cust_tm_tx_param_read(T_TM_RETURN *tm_return, WORD16 index, UWORD8 band) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
825 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
826 volatile UWORD16 value; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
827 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
828 switch (index) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
829 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
830 case TX_PWR_LEVEL: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
831 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
832 value = l1_config.tmode.tx_params.txpwr; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
833 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
834 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
835 case TX_APC_DAC: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
836 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
837 value = rf_band[tm_band].tx.levels[l1_config.tmode.tx_params.txpwr].apc; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
838 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
839 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
840 case TX_RAMP_TEMPLATE: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
841 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
842 value = rf_band[tm_band].tx.levels[l1_config.tmode.tx_params.txpwr].ramp_index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
843 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
844 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
845 case TX_CHAN_CAL_TABLE: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
846 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
847 value = rf_band[tm_band].tx.levels[l1_config.tmode.tx_params.txpwr].chan_cal_index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
848 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
849 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
850 case TX_BURST_TYPE: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
851 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
852 value = l1_config.tmode.tx_params.burst_type; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
853 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
854 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
855 case TX_BURST_DATA: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
856 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
857 value = l1_config.tmode.tx_params.burst_data; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
858 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
859 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
860 case TX_TIMING_ADVANCE: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
861 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
862 value = l1_config.tmode.tx_params.timing_advance; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
863 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
864 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
865 case TX_TRAINING_SEQ: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
866 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
867 value = l1_config.tmode.tx_params.tsc; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
868 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
869 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
870 case TX_PWR_SKIP: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
871 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
872 value = l1_config.tmode.tx_params.txpwr_skip; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
873 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
874 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
875 #if L1_GPRS |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
876 case TX_GPRS_POWER0: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
877 case TX_GPRS_POWER1: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
878 case TX_GPRS_POWER2: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
879 case TX_GPRS_POWER3: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
880 case TX_GPRS_POWER4: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
881 case TX_GPRS_POWER5: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
882 case TX_GPRS_POWER6: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
883 case TX_GPRS_POWER7: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
884 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
885 value = l1_config.tmode.tx_params.txpwr_gprs[index - TX_GPRS_POWER0]; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
886 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
887 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
888 case TX_GPRS_SLOTS: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
889 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
890 value = l1_config.tmode.tx_params.timeslot_alloc; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
891 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
892 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
893 case TX_GPRS_CODING: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
894 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
895 value = l1_config.tmode.tx_params.coding_scheme; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
896 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
897 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
898 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
899 default: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
900 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
901 tm_return->status = E_BADINDEX; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
902 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
903 return; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
904 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
905 } // end switch |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
906 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
907 memcpy(tm_return->result, (UWORD8 *)&value, 2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
908 tm_return->size = 2; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
909 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
910 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
911 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
912 void Cust_tm_tx_template_write(T_TM_RETURN *tm_return, WORD8 index, UWORD8 size, UWORD8 table[]) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
913 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
914 if (index >= sizeof(rf_band[tm_band].tx.ramp_tables)/sizeof(T_TX_RAMP)) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
915 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
916 tm_return->status = E_BADINDEX; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
917 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
918 else if (size != sizeof(T_TX_RAMP)) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
919 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
920 // We are writing both the up and down ramps; size must be exact. |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
921 tm_return->status = E_BADSIZE; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
922 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
923 else |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
924 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
925 memcpy(rf_band[tm_band].tx.ramp_tables[index].ramp_up, &table[0], size/2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
926 memcpy(rf_band[tm_band].tx.ramp_tables[index].ramp_down, &table[size/2], size/2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
927 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
928 l1_config.tmode.rf_params.reload_ramps_flag = 1; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
929 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
930 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
931 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
932 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
933 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
934 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
935 void Cust_tm_tx_template_read(T_TM_RETURN *tm_return, WORD8 index) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
936 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
937 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
938 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
939 if (index >= sizeof(rf_band[tm_band].tx.ramp_tables)/sizeof(T_TX_RAMP)) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
940 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
941 tm_return->status = E_BADINDEX; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
942 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
943 return; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
944 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
945 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
946 memcpy(&tm_return->result[0], rf_band[tm_band].tx.ramp_tables[index].ramp_up, sizeof(rf_band[tm_band].tx.ramp_tables[index].ramp_up)); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
947 memcpy(&tm_return->result[sizeof(rf_band[tm_band].tx.ramp_tables[index].ramp_up)], rf_band[tm_band].tx.ramp_tables[index].ramp_down, sizeof(rf_band[tm_band].tx.ramp_tables[index].ramp_down)); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
948 tm_return->size = sizeof(rf_band[tm_band].tx.ramp_tables[index]); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
949 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
950 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
951 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
952 void Cust_tm_misc_param_write(T_TM_RETURN *tm_return, WORD16 index, UWORD16 value) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
953 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
954 switch (index) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
955 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
956 case GPIOSTATE0: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
957 case GPIODIR0: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
958 case GPIOSTATE1: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
959 case GPIODIR1: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
960 case GPIOSTATE0P: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
961 case GPIODIR0P: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
962 case GPIOSTATE1P: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
963 case GPIODIR1P: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
964 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
965 tm_return->status = E_NOSUBSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
966 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
967 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
968 case CONVERTED_ADC0: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
969 case CONVERTED_ADC1: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
970 case CONVERTED_ADC2: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
971 case CONVERTED_ADC3: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
972 case CONVERTED_ADC4: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
973 case CONVERTED_ADC5: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
974 case CONVERTED_ADC6: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
975 case CONVERTED_ADC7: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
976 case CONVERTED_ADC8: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
977 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
978 adc.converted[index - CONVERTED_ADC0] = value; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
979 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
980 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
981 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
982 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
983 case RAW_ADC0: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
984 case RAW_ADC1: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
985 case RAW_ADC2: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
986 case RAW_ADC3: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
987 case RAW_ADC4: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
988 case RAW_ADC5: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
989 case RAW_ADC6: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
990 case RAW_ADC7: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
991 case RAW_ADC8: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
992 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
993 adc.raw[index - RAW_ADC0] = value; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
994 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
995 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
996 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
997 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
998 case ADC0_COEFF_A: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
999 case ADC1_COEFF_A: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1000 case ADC2_COEFF_A: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1001 case ADC3_COEFF_A: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1002 case ADC4_COEFF_A: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1003 case ADC5_COEFF_A: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1004 case ADC6_COEFF_A: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1005 case ADC7_COEFF_A: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1006 case ADC8_COEFF_A: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1007 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1008 adc_cal.a[index - ADC0_COEFF_A] = value; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1009 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1010 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1011 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1012 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1013 case ADC0_COEFF_B: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1014 case ADC1_COEFF_B: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1015 case ADC2_COEFF_B: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1016 case ADC3_COEFF_B: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1017 case ADC4_COEFF_B: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1018 case ADC5_COEFF_B: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1019 case ADC6_COEFF_B: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1020 case ADC7_COEFF_B: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1021 case ADC8_COEFF_B: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1022 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1023 adc_cal.b[index - ADC0_COEFF_B] = value; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1024 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1025 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1026 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1027 case SLEEP_MODE: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1028 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1029 power_down_config((UWORD8)value, UWIRE_CLK_CUT); //glowing,2004-6-17, import from M188 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1030 tm_return->status = E_NOSUBSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1031 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1032 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1033 default: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1034 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1035 tm_return->status = E_BADINDEX; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1036 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1037 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1038 } // end switch |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1039 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1040 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1041 void Cust_tm_misc_param_read(T_TM_RETURN *tm_return, WORD16 index) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1042 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1043 volatile UWORD16 value; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1044 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1045 switch (index) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1046 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1047 case GPIOSTATE0: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1048 case GPIODIR0: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1049 case GPIOSTATE1: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1050 case GPIODIR1: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1051 case GPIOSTATE0P: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1052 case GPIODIR0P: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1053 case GPIOSTATE1P: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1054 case GPIODIR1P: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1055 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1056 tm_return->status = E_NOSUBSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1057 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1058 return; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1059 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1060 case CONVERTED_ADC0: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1061 case CONVERTED_ADC1: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1062 case CONVERTED_ADC2: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1063 case CONVERTED_ADC3: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1064 case CONVERTED_ADC4: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1065 case CONVERTED_ADC5: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1066 case CONVERTED_ADC6: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1067 case CONVERTED_ADC7: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1068 case CONVERTED_ADC8: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1069 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1070 value = adc.converted[index - CONVERTED_ADC0]; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1071 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1072 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1073 case RAW_ADC0: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1074 case RAW_ADC1: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1075 case RAW_ADC2: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1076 case RAW_ADC3: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1077 case RAW_ADC4: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1078 case RAW_ADC5: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1079 case RAW_ADC6: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1080 case RAW_ADC7: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1081 case RAW_ADC8: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1082 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1083 value = adc.raw[index - RAW_ADC0]; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1084 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1085 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1086 case ADC0_COEFF_A: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1087 case ADC1_COEFF_A: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1088 case ADC2_COEFF_A: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1089 case ADC3_COEFF_A: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1090 case ADC4_COEFF_A: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1091 case ADC5_COEFF_A: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1092 case ADC6_COEFF_A: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1093 case ADC7_COEFF_A: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1094 case ADC8_COEFF_A: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1095 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1096 value = adc_cal.a[index - ADC0_COEFF_A]; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1097 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1098 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1099 case ADC0_COEFF_B: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1100 case ADC1_COEFF_B: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1101 case ADC2_COEFF_B: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1102 case ADC3_COEFF_B: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1103 case ADC4_COEFF_B: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1104 case ADC5_COEFF_B: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1105 case ADC6_COEFF_B: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1106 case ADC7_COEFF_B: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1107 case ADC8_COEFF_B: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1108 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1109 value = adc_cal.b[index - ADC0_COEFF_B]; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1110 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1111 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1112 case SLEEP_MODE: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1113 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1114 tm_return->status = E_NOSUBSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1115 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1116 return; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1117 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1118 default: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1119 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1120 tm_return->status = E_BADINDEX; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1121 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1122 return; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1123 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1124 } // end switch |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1125 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1126 memcpy(tm_return->result, (UWORD8 *)&value, 2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1127 tm_return->size = 2; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1128 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1129 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1130 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1131 void Cust_tm_misc_enable(T_TM_RETURN *tm_return, WORD16 action) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1132 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1133 UWORD8 status; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1134 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1135 // FIXME: This enum really should go into testmode header file. |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1136 enum ME_CFG_WRITE_E { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1137 CFG_WRITE_MKDIRS = 100, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1138 CFG_WRITE_RF_CAL = 102, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1139 CFG_WRITE_RF_CFG = 103, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1140 CFG_WRITE_TX_CAL = 104, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1141 CFG_WRITE_TX_CFG = 105, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1142 CFG_WRITE_RX_CAL = 106, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1143 CFG_WRITE_RX_CFG = 107, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1144 CFG_WRITE_SYS_CAL = 108, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1145 CFG_WRITE_SYS_CFG = 109 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1146 }; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1147 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1148 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1149 tm_return->index = action; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1150 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1151 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1152 // FIXME: This code should actually be in misc_enable() |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1153 switch(action) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1154 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1155 case CFG_WRITE_MKDIRS: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1156 ffs_mkdir("/gsm"); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1157 ffs_mkdir("/pcm"); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1158 ffs_mkdir("/sys"); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1159 ffs_mkdir("/mmi"); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1160 ffs_mkdir("/vos"); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1161 ffs_mkdir("/var"); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1162 ffs_mkdir("/gsm/rf"); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1163 ffs_mkdir("/gsm/com"); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1164 ffs_mkdir("/vos/vm"); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1165 ffs_mkdir("/vos/vrm"); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1166 ffs_mkdir("/vos/vrp"); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1167 ffs_mkdir("/var/log"); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1168 ffs_mkdir("/var/tst"); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1169 ffs_mkdir("/gsm/rf/tx"); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1170 ffs_mkdir("/gsm/rf/rx"); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1171 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1172 case CFG_WRITE_RF_CAL: config_ffs_write('f'); break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1173 case CFG_WRITE_RF_CFG: config_ffs_write('F'); break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1174 case CFG_WRITE_TX_CAL: config_ffs_write('t'); break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1175 case CFG_WRITE_TX_CFG: config_ffs_write('T'); break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1176 case CFG_WRITE_RX_CAL: config_ffs_write('r'); break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1177 case CFG_WRITE_RX_CFG: config_ffs_write('R'); break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1178 case CFG_WRITE_SYS_CAL: config_ffs_write('s'); break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1179 case CFG_WRITE_SYS_CFG: config_ffs_write('S'); break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1180 default: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1181 tm_return->status = E_BADINDEX; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1182 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1183 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1184 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1185 void Cust_tm_special_param_write(T_TM_RETURN *tm_return, WORD16 index, UWORD16 value) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1186 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1187 #if 0 //glowing,2004-06-17, comment |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1188 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1189 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1190 tm_return->status = E_NOSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1191 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1192 //glowing,2004-06-17,import from M188 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1193 volatile int status; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1194 extern void SetUserBackGround(short value); //chenjun add 2003-01-24 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1195 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1196 switch ( index ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1197 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1198 case LCD_SWITCH://lcd on/off; value=1 is lcd on, PASS, Ref. l1tm_cust_add.c |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1199 ctrlcd(value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1200 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1201 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1202 //case LED_SWITCH://led on/off; value=1 is led on |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1203 // ctrled(value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1204 // break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1205 case BACKLIGHT_SWITCH://backlight on/off; value=1 is on, PASS |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1206 ctrbacklight(value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1207 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1208 case VIBRATOR_CHECK://vibrator on/off; value =1 is on, PASS |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1209 ctrvibrator(value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1210 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1211 //case BUZZER_CHECK://buzzer on/off; value =1 is on, No buzzer in MI188, Jeffrey, 04/01/04 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1212 // ctrbuzzer(value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1213 // break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1214 case TELL_SIMPHB_NUM: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1215 tell_simphb_num(value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1216 g_pcsyncstatus=1; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1217 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1218 case SET_SLEEPMODE: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1219 power_down_config(value, UWIRE_CLK_CUT); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1220 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1221 case TELL_SMSFILE_NUM: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1222 tell_smsFile_num(value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1223 g_pcsyncstatus=1; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1224 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1225 case DEL_SIM_SMS: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1226 del_sim_sms(value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1227 g_pcsyncstatus=1; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1228 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1229 case CHANGE_SIM_SMS: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1230 change_sim_sms(value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1231 g_pcsyncstatus=1; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1232 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1233 case TELL_NVMPHB_NUM: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1234 tell_nvmphb_num(value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1235 g_pcsyncstatus=1; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1236 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1237 case TRACE_AUDIOTASK://wms added 03-03-20 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1238 trace_audio_task(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1239 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1240 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1241 case WRITE_TESTNUMBER: // Jeffrey, for production test, 04/06/04 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1242 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1243 short ret; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1244 ret = write_TestNumber(value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1245 if ( ret ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1246 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1247 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1248 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1249 memcpy(tm_return->result, (UWORD8 *)&ret, 2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1250 tm_return->status = E_NOSUBSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1251 return; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1252 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1253 tm_return->size = 2; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1254 memcpy(tm_return->result, (UWORD8 *)&value, 2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1255 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1256 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1257 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1258 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1259 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1260 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1261 /* |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1262 //chenjun add 2003-01-23 begin |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1263 case SET_USUAL_RING: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1264 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1265 SetEnvironRing(0,(short)value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1266 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1267 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1268 case SET_OUTDOOR_RING: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1269 SetEnvironRing(1,(short)value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1270 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1271 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1272 case SET_MEETING_RING: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1273 SetEnvironRing(2,(short)value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1274 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1275 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1276 case SET_INCAR_RING: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1277 SetEnvironRing(3,(short)value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1278 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1279 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1280 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1281 //chenjun add 2003-01-23 over |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1282 */ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1283 case SET_USER_BACK: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1284 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1285 //SPI_WriteTX_MSB(0x0A << 6 |TOGBR1); // Initialize transmit register. This transmission |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1286 //SPI_StartWrite(); // enables selected OMEGA modules |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1287 //glowing,2004-06-17, use the new spi api |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1288 #if 0 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1289 SPI_WRITE_TX_MSB(0x0A << 6 | TOGBR1); // Initialize transmit register. This transmission |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1290 SPI_START_WRITE // enables selected OMEGA modules |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1291 while(((status = Spi->SPI_CTRL_STAT_UN.SPI_CTRL_STAT_ST.SPI_REG_STATUS) & WE_ST) == 0); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1292 #else |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1293 ABB_Write_Register_on_page( PAGE0, TOGBR1, 0x0A ); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1294 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1295 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1296 ABB_UlMute(0); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1297 ABB_DlMute(0); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1298 ABB_SideTone(175); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1299 dspl_TextOut(0, 0, 0, "loop audio test"); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1300 SetUserBackGround(value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1301 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1302 /* glowing,2004-06-17, we doesn't define DRVPCTMTRACE. |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1303 * some of the following functions doesn't define |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1304 * in this version, so let it be. |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1305 */ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1306 #ifdef DRVPCTMTRACE |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1307 case TRACE_CMD: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1308 switch ( value ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1309 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1310 /*0~9 for hall*/ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1311 case 0: //hallstatusflag |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1312 TraceHallVarvalue(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1313 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1314 case 1: //hall mask register |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1315 TraceHallMaskRegister(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1316 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1317 case 2: //hall status register |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1318 TraceHallOnOff(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1319 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1320 case 3: //hall |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1321 AI_MaskIT(2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1322 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1323 case 4: //hall |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1324 AI_UnmaskIT(2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1325 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1326 case 5: //hall |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1327 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1328 case 6: //hall |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1329 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1330 case 7: //hall |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1331 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1332 case 8: //hall |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1333 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1334 case 9: //hall |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1335 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1336 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1337 /*10~19 for charger*/ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1338 case 10: //pwr_status |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1339 TracePwrstatus(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1340 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1341 case 11: //ÍⲿÖжÏmask |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1342 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1343 case 12: //mmiµç³ØÐÅÏ¢ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1344 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1345 case 13: //µç³Øµçѹ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1346 RivieraTrace_Chunhui("_GetBatteryVoltage(1)=", GetBatteryVoltage(1)); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1347 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1348 case 14: //³äµçµçѹ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1349 GetChargerVoltage(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1350 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1351 case 15: //³äµçµçÁ÷ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1352 GetChargerCurrent(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1353 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1354 case 16: //charger |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1355 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1356 case 17: //charger |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1357 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1358 case 18: //charger |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1359 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1360 case 19: //charger |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1361 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1362 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1363 /*20~29 for keypad*/ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1364 case 20: //keypad mask |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1365 TraceKeypadMaskRegister(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1366 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1367 case 21: //keypad |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1368 RivieraTrace_Chunhui("kpd_scan_keypad", kpd_scan_keypad()); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1369 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1370 case 22: //keypad |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1371 Trace_kbd_gpio_int(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1372 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1373 case 23: //keypad |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1374 kpd_acknowledge_key_pressed(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1375 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1376 case 24: //keypad |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1377 AI_MaskIT(1); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1378 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1379 case 25: //keypad |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1380 Set_g_interrupt_to_zero(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1381 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1382 case 26: //keypad |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1383 Trace_g_interrupt_value(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1384 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1385 case 27: //keypad |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1386 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1387 case 28: //keypad |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1388 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1389 case 29: //keypad |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1390 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1391 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1392 /*30~39 for lamp*/ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1393 case 30: //lamp |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1394 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1395 case 31: //lamp |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1396 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1397 case 32: //lamp |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1398 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1399 case 33: //lamp |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1400 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1401 case 34: //lamp |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1402 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1403 case 35: //lamp |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1404 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1405 case 36: //lamp |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1406 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1407 case 37: //lamp |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1408 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1409 case 38: //lamp |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1410 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1411 case 39: //lamp |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1412 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1413 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1414 /*40~49 for lcd*/ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1415 case 40: //lcd not use ,instead of using se 10 by ganch |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1416 //µ¹ÖÃ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1417 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1418 case 41: //lcd |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1419 //Ó²¼þreset |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1420 RivieraTrace_Chunhui("_now call resetlcd()_",0); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1421 ResetLCD(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1422 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1423 case 42: //lcd |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1424 //lcdÈí¼þreset |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1425 RivieraTrace_Chunhui("_now call ColorLcd_Init(1)_",0); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1426 ColorLCD_Init(1); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1427 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1428 case 43: //lcd |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1429 //¿´³õʼ»¯lcdÊÇ·ñ³É¹¦ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1430 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1431 case 44: //lcd |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1432 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1433 case 45: //lcd |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1434 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1435 case 46: //lcd |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1436 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1437 case 47: //lcd |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1438 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1439 case 48: //lcd |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1440 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1441 case 49: //lcd |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1442 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1443 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1444 /*50~59 for flash*/ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1445 case 50: //flash |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1446 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1447 case 51: //flash |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1448 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1449 case 52: //flash |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1450 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1451 case 53: //flash |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1452 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1453 case 54: //flash |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1454 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1455 case 55: //flash |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1456 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1457 case 56: //flash |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1458 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1459 case 57: //flash |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1460 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1461 case 58: //flash |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1462 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1463 case 59: //flash |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1464 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1465 case 60: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1466 MmiTrace("60"); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1467 print_mfw_link(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1468 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1469 default: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1470 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1471 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1472 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1473 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1474 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1475 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1476 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1477 case CALL_EMERGENCY: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1478 if(value == 1) /* dialling 112 */ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1479 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1480 /*if(sAT_Dn(0, "112", -1, -1, 0) != 1)*/ /* return 1 if dialling in progress */ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1481 if(cm_mo_call("112", 1) != 1) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1482 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1483 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1484 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1485 tm_return->status = E_NOSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1486 return; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1487 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1488 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1489 else /* hang up */ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1490 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1491 cm_disconnect(1); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1492 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1493 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1494 case SET_ENCRYPT_KEY: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1495 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1496 short ret; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1497 /* 2004/06/08, zhq ,commit it because it is for test only. |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1498 char tmpstr[50] = {0}; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1499 char tmpstr2[50] = {0}; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1500 strcpy(tmpstr, "value="); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1501 Num2Str(value, tmpstr2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1502 strcat(tmpstr,tmpstr2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1503 dspl_TextOut(0, 0, 0, tmpstr); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1504 */ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1505 ret = Set_Encrypt_Key(value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1506 if ( ret ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1507 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1508 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1509 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1510 memcpy(tm_return->result, (UWORD8 *)&ret, 2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1511 tm_return->status = E_NOSUBSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1512 return; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1513 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1514 tm_return->size = 2; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1515 memcpy(tm_return->result, (UWORD8 *)&value, 2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1516 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1517 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1518 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1519 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1520 case AUDIO_LOOP: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1521 if(value == 1) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1522 Audio_Loop_Test_pctm_start(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1523 else |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1524 Audio_Loop_Test_pctm_stop(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1525 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1526 case SPEAK_RING: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1527 if(value == 1) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1528 Speaker_Vibrator_Test_Start(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1529 else |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1530 Speaker_Vibrator_Test_Stop(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1531 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1532 case SET_MAINBOARD_TYPE: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1533 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1534 /* 2004/06/08, zhq, add for production test purpose. |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1535 0 indicate 188 serial of mainboard. |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1536 1 indicate 288 serial of mainboard. |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1537 2 indicate 388 serial of mainboard. |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1538 3 indicate 588 serial of mainboard. |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1539 etc. |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1540 */ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1541 short ret; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1542 ret = Set_MainboardType(value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1543 if ( ret ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1544 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1545 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1546 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1547 memcpy(tm_return->result, (UWORD8 *)&ret, 2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1548 tm_return->status = E_NOSUBSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1549 return; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1550 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1551 tm_return->size = 2; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1552 memcpy(tm_return->result, (UWORD8 *)&value, 2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1553 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1554 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1555 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1556 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1557 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1558 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1559 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1560 default: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1561 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1562 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1563 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1564 #ifdef DRVPCTMTRACE //ljq add for trace_pctm command 2003/1/8 according to ganch |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1565 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1566 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1567 memcpy(tm_return->result, (UWORD8 *)&value, 1); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1568 tm_return->size = 1; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1569 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1570 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1571 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1572 #else |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1573 MmiTrace("return ok"); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1574 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1575 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1576 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1577 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1578 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1579 //glowing,2004-06-17,end of import |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1580 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1581 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1582 void Cust_tm_special_param_read(T_TM_RETURN *tm_return, WORD16 index) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1583 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1584 #if 0 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1585 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1586 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1587 tm_return->status = E_NOSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1588 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1589 //glowing,2004-06-17,import from M188 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1590 extern void GetUserBackGround(short* value); //chenjun add 2003-01-24 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1591 extern char *ver; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1592 volatile UWORD16 value=0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1593 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1594 switch ( index ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1595 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1596 case SIM_CHECK://check sim card ; if check sim card ok , return 1 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1597 value = checksim(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1598 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1599 case NETWORK_CHECK://check network ; if network ok , return 1 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1600 value = checknetavail(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1601 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1602 case READ_SIM_PHB: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1603 value= read_sim_phb(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1604 g_pcsyncstatus=1; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1605 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1606 case WRITE_SIM_PHB: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1607 value=write_sim_phb(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1608 g_pcsyncstatus=1; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1609 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1610 case READ_SIM_SMS: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1611 value=read_sim_sms(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1612 g_pcsyncstatus=1; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1613 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1614 case READ_NEW_SMS: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1615 value=read_new_sms(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1616 g_pcsyncstatus=1; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1617 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1618 case SEND_SMS: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1619 value=send_sms(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1620 g_pcsyncstatus=1; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1621 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1622 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1623 case READ_TESTNUMBER://Jeffrey, read test number for production test, 04/06/04 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1624 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1625 int ret = read_TestNumber(&value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1626 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1627 if ( ret < 0 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1628 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1629 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1630 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1631 memcpy(tm_return->result, &ret, sizeof(int)); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1632 tm_return->status = E_AGAIN; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1633 return; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1634 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1635 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1636 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1637 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1638 case GET_USER_BACK: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1639 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1640 char v[12]; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1641 GetUserBackGround((short*)&value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1642 sprintf(v, "User BG=%d", value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1643 dspl_TextOut(0, 0, 0, v); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1644 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1645 break;//chenjun 0227 add break |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1646 case READ_PBOPTION: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1647 flash_PBOtherRead("PBOption"); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1648 break; //chenjun add 0227 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1649 case GET_ENCRYPT_KEY: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1650 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1651 short ret; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1652 char tmpstr[50] = {0}; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1653 char tmpstr2[50] = {0}; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1654 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1655 ret = Get_Encrypt_Key(&value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1656 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1657 /* 2004/06/08, zhq ,commit it because it is for test only. |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1658 strcpy(tmpstr, "value="); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1659 Num2Str(value, tmpstr2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1660 strcat(tmpstr,tmpstr2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1661 dspl_TextOut(0, 0, 0, tmpstr); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1662 */ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1663 tm_return->size = 2; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1664 memcpy(tm_return->result, (UWORD8 *)&value, 2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1665 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1666 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1667 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1668 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1669 case GET_MAINBOARD_TYPE: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1670 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1671 /* 2004/06/08, zhq, add for production test purpose. |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1672 0 indicate 188 serial of mainboard. |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1673 1 indicate 288 serial of mainboard. |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1674 2 indicate 388 serial of mainboard. |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1675 3 indicate 588 serial of mainboard. |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1676 etc. |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1677 */ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1678 int ret ; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1679 char tmpstr[50] = {0}; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1680 char tmpstr2[50] = {0}; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1681 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1682 ret = Get_MainboardType(&value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1683 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1684 /* 2004/06/08, zhq ,commit it because it is for test only. |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1685 strcpy(tmpstr, "value="); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1686 Num2Str(value, tmpstr2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1687 strcat(tmpstr,tmpstr2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1688 dspl_TextOut(0, 0, 0, tmpstr); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1689 */ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1690 if ( ret < 0 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1691 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1692 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1693 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1694 memcpy(tm_return->result, &ret, sizeof(int)); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1695 tm_return->status = E_AGAIN; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1696 return; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1697 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1698 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1699 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1700 default: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1701 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1702 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1703 tm_return->size = strlen(ver); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1704 memcpy((void*)tm_return->result, (void*)ver, tm_return->size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1705 return; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1706 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1707 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1708 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1709 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1710 memcpy(tm_return->result, (UWORD8 *)&value, 2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1711 tm_return->size = 2; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1712 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1713 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1714 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1715 //glowing,2004-06-17,end of import |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1716 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1717 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1718 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1719 void Cust_tm_special_table_write(T_TM_RETURN *tm_return, WORD8 index, UWORD8 size, UWORD8 table[]) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1720 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1721 #if 0 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1722 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1723 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1724 tm_return->status = E_NOSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1725 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1726 //glowing,2004-06-17,import from M188 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1727 extern void SetRingAlarmGroupRing( unsigned char data[]); //chenjun add 2003-01-23 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1728 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1729 WORD8 coef_no; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1730 WORD16 *addr; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1731 WORD16 data; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1732 extern T_L1A_L1S_COM l1a_l1s_com; // Get access to DSP configuration |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1733 extern T_L1S_DSP_COM l1s_dsp_com; // Get access to DSP configuration |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1734 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1735 int nRetval; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1736 UWORD16 value=0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1737 UWORD32 Reg; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1738 volatile UWORD16 *pReg; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1739 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1740 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1741 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1742 tm_return->status = E_NOSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1743 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1744 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1745 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1746 switch ( index ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1747 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1748 //by xmzhou to test audio(FIR,echo) according to Jesper-------------------------- |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1749 case 1:// PCTM command to update DL FIR: STW 1 [coef 1] [coef 2] .. [coef 31] |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1750 { // First initialize PCTM by writing: STW -s 1 "%31[%y %]" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1751 if ( size == (31*2) ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1752 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1753 for ( coef_no=0; coef_no<31; coef_no++ ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1754 #if (DSP == 33) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1755 l1s_dsp_com.dsp_param_ptr->a_fir31_downlink[coef_no] = (table[coef_no*2+1]<<8) | table[coef_no*2]; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1756 #else |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1757 //glowing,2004-06-17,modify |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1758 // l1s_dsp_com.dsp_ndb_ptr->a_fir31_downlink[coef_no] = (table[coef_no*2+1]<<8) | table[coef_no*2]; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1759 l1s_dsp_com.dsp_param_ptr->a_fir31_downlink[coef_no] = (table[coef_no*2+1]<<8) | table[coef_no*2]; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1760 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1761 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1762 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1763 else |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1764 tm_return->status = E_BADSIZE; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1765 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1766 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1767 case 2:// PCTM command to update UL FIR: STW 2 [coef 1] [coef 2] .. [coef 31] |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1768 { // First initialize PCTM by writing: STW -s 2 "%31[%y %]" |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1769 if ( size == (31*2) ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1770 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1771 for ( coef_no=0; coef_no<31; coef_no++ ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1772 #if (DSP == 33) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1773 l1s_dsp_com.dsp_param_ptr->a_fir31_uplink[coef_no] = (table[coef_no*2+1]<<8) | table[coef_no*2]; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1774 #else |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1775 //glowing,2004-06-17,modify |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1776 // l1s_dsp_com.dsp_ndb_ptr->a_fir31_uplink[coef_no] = (table[coef_no*2+1]<<8) | table[coef_no*2]; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1777 l1s_dsp_com.dsp_param_ptr->a_fir31_uplink[coef_no] = (table[coef_no*2+1]<<8) | table[coef_no*2]; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1778 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1779 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1780 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1781 else |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1782 tm_return->status = E_BADSIZE; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1783 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1784 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1785 case 3:// PCTM command to update AEC/Noise Reduction algo.: STW 3 [value] |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1786 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1787 l1s_dsp_com.dsp_ndb_ptr->d_aec_ctrl = (table[1]<<8) | table[0]; // aec/nr control variable |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1788 l1a_l1s_com.aec_task.command.start = FALSE; // Start the AEC with new setting |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1789 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1790 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1791 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1792 //end of xmzhou add----------------------------------------------------------- |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1793 case WRITE_REG_TEST: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1794 Reg=(table[0]<<24) | (table[1]<<16) |(table[2]<<8) |(table[3]); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1795 pReg=(UWORD16 *)Reg; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1796 *pReg=(table[4]<<8) |table[5]; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1797 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1798 tm_return->size = 2; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1799 memcpy(tm_return->result, (UWORD8 *)&value, 2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1800 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1801 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1802 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1803 case READ_REG_TEST: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1804 Reg=(table[0]<<24) | (table[1]<<16) |(table[2]<<8) |(table[3]); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1805 pReg=(UWORD16 *)Reg; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1806 value=*pReg; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1807 tm_return->size = 2; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1808 memcpy(tm_return->result, (UWORD8 *)&value, 2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1809 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1810 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1811 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1812 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1813 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1814 case WRITE_IMEI://write Imei |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1815 nRetval=write_imei(&table[0]); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1816 if ( nRetval==FALSE ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1817 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1818 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1819 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1820 tm_return->status = E_NOSUBSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1821 return; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1822 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1823 tm_return->size = 2; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1824 memcpy(tm_return->result, (UWORD8 *)&value, 2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1825 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1826 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1827 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1828 case WRITE_SERIALNUMBER://write serial number |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1829 nRetval=write_SerialNumber(&table[0]); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1830 if ( nRetval==FALSE ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1831 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1832 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1833 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1834 tm_return->status = E_NOSUBSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1835 return; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1836 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1837 tm_return->size = 2; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1838 memcpy(tm_return->result, (UWORD8 *)&value, 2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1839 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1840 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1841 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1842 case KEY_SIMULATION: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1843 nRetval=key_simulation(size,&table[0]); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1844 if ( nRetval==FALSE ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1845 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1846 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1847 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1848 tm_return->status = E_NOSUBSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1849 return; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1850 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1851 tm_return->size = 2; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1852 memcpy(tm_return->result, (UWORD8 *)&value, 2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1853 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1854 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1855 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1856 case SET_RTC: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1857 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1858 T_RVF_RET ret; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1859 ret=RTC_SetDateTime(*((T_RTC_DATE_TIME *)table)); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1860 if ( ret!=RV_OK ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1861 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1862 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1863 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1864 tm_return->status = E_NOSUBSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1865 return; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1866 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1867 tm_return->size = 2; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1868 memcpy(tm_return->result, (UWORD8 *)&value, 2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1869 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1870 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1871 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1872 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1873 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1874 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1875 case SET_CUR_RING: //chenjun add 2003-01-23 to set ringtype, alarmtype and grouping ringtype |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1876 SetRingAlarmGroupRing( table); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1877 tm_return->size = 18; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1878 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1879 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1880 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1881 case WRITE_CMD_PW: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1882 tm_return->size = 2; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1883 memcpy(tm_return->result, (UWORD8 *)&value, 2); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1884 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1885 if ( (strncmp((char *)table,CmdPW,6)==0) ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1886 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1887 OpenCmd=1; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1888 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1889 return ; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1890 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1891 else |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1892 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1893 OpenCmd=0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1894 tm_return->status = E_NOSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1895 return ; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1896 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1897 //end of hxl add,2003-4-14 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1898 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1899 default: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1900 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1901 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1902 tm_return->status = E_BADCID; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1903 return; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1904 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1905 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1906 //glowing,2004-06-17,end of import |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1907 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1908 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1909 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1910 void Cust_tm_special_table_read(T_TM_RETURN *tm_return, WORD8 index) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1911 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1912 #if 0 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1913 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1914 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1915 tm_return->status = E_NOSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1916 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1917 extern void GetRingAlarmGroupRing(char* data );//chenjun add 2003-01-23 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1918 extern char *ver, *date; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1919 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1920 char value[30]; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1921 int nRetval; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1922 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1923 switch ( index ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1924 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1925 case READ_IMEI://read Imei |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1926 nRetval=get_imei(value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1927 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1928 if ( nRetval==FALSE ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1929 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1930 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1931 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1932 tm_return->status = E_NOSUBSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1933 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1934 else |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1935 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1936 tm_return->size = 16; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1937 memcpy(tm_return->result, value, tm_return->size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1938 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1939 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1940 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1941 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1942 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1943 case READ_SERIALNUMBER://read serial number |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1944 nRetval=read_SerialNumber(value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1945 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1946 if ( nRetval==FALSE ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1947 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1948 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1949 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1950 tm_return->status = E_NOSUBSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1951 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1952 else |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1953 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1954 tm_return->size = 8; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1955 memcpy(tm_return->result, value, tm_return->size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1956 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1957 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1958 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1959 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1960 case READ_RTC: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1961 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1962 // nRetval=read_rtc(value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1963 T_RVF_RET ret; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1964 T_RTC_DATE_TIME data_time; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1965 ret=RTC_GetDateTime(&data_time); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1966 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1967 if ( ret!=RV_OK ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1968 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1969 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1970 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1971 tm_return->status = E_NOSUBSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1972 return; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1973 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1974 else |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1975 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1976 sprintf(value,"%2d:%2d:%2d %2d-%2d-%2d %2d;%d;%d", |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1977 data_time.hour, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1978 data_time.minute, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1979 data_time.second, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1980 data_time.year, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1981 data_time.month, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1982 data_time.day, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1983 data_time.wday, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1984 data_time.mode_12_hour, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1985 data_time.PM_flag); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1986 value[24]=0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1987 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1988 tm_return->size = 25; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1989 memcpy(tm_return->result, value, tm_return->size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1990 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1991 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1992 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1993 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1994 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1995 //zhonghz, for read rtc control REG |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1996 case READ_RTC_STATUS: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1997 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1998 T_RVF_RET ret; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
1999 T_RTC_STATUS rtc_status; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2000 char tmpvalue[100]; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2001 memset(tmpvalue,0,100); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2002 ret=RTC_GetStatus(&rtc_status); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2003 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2004 if ( ret!=RV_OK ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2005 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2006 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2007 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2008 tm_return->status = E_NOSUBSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2009 return; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2010 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2011 else |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2012 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2013 sprintf(tmpvalue,"ctrl:0x%2x,stat:0x%2x,int:0x%2x,cl:0x%2x,cm:0x%2x", |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2014 rtc_status.ctrl_reg, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2015 rtc_status.stat_reg, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2016 rtc_status.int_reg, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2017 rtc_status.cmpl_reg, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2018 rtc_status.cmpm_reg); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2019 tmpvalue[45]=0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2020 tm_return->size = 44; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2021 memcpy(tm_return->result, tmpvalue, tm_return->size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2022 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2023 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2024 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2025 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2026 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2027 case CHECK_FILE_STATUS: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2028 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2029 UWORD8 size; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2030 size=IsPcCmdExcuteEnd(value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2031 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2032 tm_return->size = size; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2033 memcpy(tm_return->result, value, tm_return->size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2034 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2035 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2036 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2037 MmiTraceInt(value[0]); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2038 MmiTraceInt(value[1]); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2039 MmiTraceInt(value[2]); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2040 MmiTraceInt(value[3]); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2041 MmiTraceInt(size); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2042 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2043 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2044 g_pcsyncstatus=1; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2045 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2046 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2047 case GET_CUR_RING: //chenjun add 2003-01-23 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2048 GetRingAlarmGroupRing(value); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2049 tm_return->size =18; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2050 memcpy(tm_return->result, (unsigned char*)value, 18); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2051 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2052 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2053 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2054 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2055 case READ_SWVER: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2056 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2057 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2058 tm_return->size = strlen(ver)+strlen(date); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2059 memcpy((void*)tm_return->result, (void*)ver, strlen(ver)); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2060 memcpy((void*)(tm_return->result + strlen(ver)), (void*)date, strlen(date)); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2061 return; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2062 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2063 default: |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2064 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2065 tm_return->index = index; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2066 tm_return->status = E_BADCID; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2067 break; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2068 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2069 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2070 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2071 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2072 void Cust_tm_special_enable(T_TM_RETURN *tm_return, WORD16 action) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2073 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2074 #if 0 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2075 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2076 tm_return->index = action; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2077 tm_return->status = E_NOSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2078 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2079 //Bob added 03/21 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2080 int i=0,j=0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2081 //char name[8]; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2082 char *ptr; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2083 tm_return->size = 0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2084 tm_return->index = action; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2085 tm_return->status = E_NOSYS; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2086 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2087 //by xmzhou to enable DAI test according to Jesper |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2088 if ( action == 1 ) // PCTM command to activate MCSI: SE 1 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2089 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2090 *((volatile UINT16 *) 0xfffef00a) &= 0xfe1f; // Switch GPIO to MCSI (DAI) mode |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2091 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2092 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2093 //by xmzhou to enable LCD backlight |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2094 if ( action == 2 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2095 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2096 ctrlcd(255); //open LCD backlight |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2097 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2098 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2099 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2100 //by xmzhou to disable LCD backlight |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2101 if ( action == 3 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2102 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2103 ctrlcd(0); //disable LCD backlight |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2104 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2105 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2106 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2107 //by xmhout to test l1 engineering mode rx level and quality |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2108 if ( action == 4 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2109 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2110 extern void layer1_em_get_rxlevqual(WORD32 *l1_rxlev_scell,WORD32 *l1_rxlev_dedic_sub, |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2111 WORD32 *l1_rxqual_dedic,WORD32 *l1_rxqual_dedic_sub); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2112 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2113 WORD32 a,b,c,d; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2114 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2115 layer1_em_get_rxlevqual(&a,&b,&c,&d); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2116 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2117 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2118 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2119 //by xmzhou to test l1 engineering mode l1_mode |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2120 if ( action == 5 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2121 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2122 extern void layer1_em_get_mode(WORD32 *l1_mode); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2123 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2124 WORD32 a; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2125 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2126 layer1_em_get_mode(&a); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2127 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2128 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2129 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2130 //by xmzhou to play melody E2 No1 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2131 if ( action == 6 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2132 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2133 // extern void RingStart1(void); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2134 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2135 // RingStart1(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2136 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2137 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2138 //by xmzhou to stop melody E2 No1 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2139 if ( action == 7 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2140 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2141 //xtern void RingStop1(void); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2142 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2143 //ingStop1(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2144 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2145 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2146 //by xmzhou to play melody E2 No2 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2147 if ( action == 8 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2148 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2149 //extern void RingStart2(void); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2150 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2151 //RingStart2(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2152 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2153 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2154 //by xmzhou to stop melody E2 No2 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2155 if ( action == 9 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2156 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2157 // extern void RingStop2(void); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2158 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2159 // RingStop2(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2160 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2161 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2162 if ( action==10 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2163 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2164 extern void ColorLCDCommandRead(void); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2165 ColorLCDCommandRead(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2166 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2167 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2168 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2169 /*control trace comand */ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2170 if ( action==11 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2171 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2172 #if 0 //glowing,2004-06-17,comment |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2173 extern UNSIGNED RivieraTraceFlag; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2174 RivieraTraceFlag=1; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2175 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2176 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2177 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2178 /*control trace comand */ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2179 if ( action==12 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2180 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2181 #if 0 //glowing,2004-06-17,comment |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2182 extern UNSIGNED RivieraTraceFlag; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2183 RivieraTraceFlag=0; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2184 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2185 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2186 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2187 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2188 if ( action == 20 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2189 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2190 // extern void Mic_on(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2191 Mic_on(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2192 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2193 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2194 if ( action == 21 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2195 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2196 // extern void Mic_off(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2197 Mic_off(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2198 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2199 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2200 if ( action == 22 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2201 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2202 Spk_on(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2203 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2204 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2205 if ( action == 23 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2206 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2207 Spk_off(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2208 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2209 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2210 if ( action == 24 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2211 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2212 Red_On(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2213 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2214 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2215 if ( action == 25 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2216 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2217 Red_Off(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2218 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2219 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2220 if ( action == 26 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2221 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2222 Green_On(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2223 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2224 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2225 if ( action == 27 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2226 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2227 Green_Off(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2228 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2229 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2230 if ( action == 28 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2231 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2232 Vibrator_on(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2233 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2234 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2235 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2236 if ( action == 29 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2237 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2238 Vibrator_off(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2239 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2240 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2241 if ( action == 30 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2242 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2243 Backlight_ON(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2244 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2245 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2246 if ( action == 31 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2247 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2248 Backlight_OFF(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2249 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2250 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2251 //end Bob added 01/25 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2252 if ( action == 32 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2253 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2254 SetMVol_DownLinkPGA(6); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2255 //StartMelody(0); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2256 StartPlayingMelody2(0,0); //glowing,2003-12-23, use the yamaha api |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2257 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2258 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2259 if ( action == 33 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2260 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2261 //StopMelody(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2262 StopPlayingMelody2(); //glowing,2003-12-23, use the yamaha api |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2263 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2264 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2265 if ( action==34 ) //ganchh 2003/3/15 for Layer1 and Riviera trace switch on |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2266 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2267 #if 0 //glowing,2004-06-17,comment |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2268 extern UWORD32 layer1_trace_mask; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2269 extern UWORD32 riviera_trace_mask; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2270 layer1_trace_mask=0xffffffff;//enable all the layer1 trace |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2271 riviera_trace_mask=0xffffffff;//enable all trace |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2272 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2273 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2274 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2275 if ( action==35 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2276 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2277 #if 0 //glowing,2004-06-17,comment |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2278 extern UWORD32 layer1_trace_mask; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2279 extern UWORD32 riviera_trace_mask; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2280 layer1_trace_mask=0x0; //disable all the layer1 trace |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2281 riviera_trace_mask=0x0; //diable all trace |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2282 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2283 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2284 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2285 if ( action == 50 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2286 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2287 GetTimerInfo(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2288 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2289 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2290 if ( action == 51 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2291 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2292 GetTaskInfo(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2293 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2294 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2295 if ( action ==52 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2296 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2297 // TestTimerInfo(); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2298 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2299 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2300 #if 0 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2301 if ( action == 53 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2302 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2303 timer = TMD_Active_Timers_List; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2304 MmiTrace("T is:"); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2305 while ( i<8 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2306 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2307 app_timer = (TM_APP_TCB *) timer -> tm_information; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2308 expiration_routine = app_timer -> tm_expiration_routine; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2309 ptr=(((TM_APP_TCB *)app_timer)->tm_name); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2310 for ( j=0;j<8;j++ ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2311 Bobname[i][j]=*ptr++; //app_timer->tm_name[j];pointer = (((TC_TCB *) TCD_Current_Thread) -> tc_name); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2312 // MmiTrace(name); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2313 MmiTraceInt(expiration_routine); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2314 timer=(TM_TCB *)timer->tm_next_timer; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2315 i++; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2316 // Bobtrace(name, ((TM_APP_TCB *)app_timer -> tm_expiration_routine)); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2317 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2318 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2319 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2320 if ( action == 55 ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2321 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2322 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2323 for ( i=0;i<8;i++ ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2324 MmiTrace(Bobname[i]); |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2325 tm_return->status = E_OK; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2326 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2327 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2328 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2329 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2330 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2331 void Cust_set_voicefir(void){ |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2332 #if 0 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2333 int i; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2334 extern T_L1S_DSP_COM l1s_dsp_com; // Get access to DSP configuration |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2335 for ( i=0; i<31; i++ ) |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2336 { |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2337 l1s_dsp_com.dsp_param_ptr->a_fir31_downlink[i] =voice_a_fir31_downlink[i]; |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2338 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2339 #endif |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2340 } |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2341 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2342 |
bf5d58fc0de7
l1tm_cust.c: initial import from MV100 source
Mychaela Falconia <falcon@freecalypso.org>
parents:
185
diff
changeset
|
2343 #endif // TESTMODE |