annotate src/cs/layer1/tm_cust0/l1tm_cust.c @ 484:a1946652f71c

top README: update for the status of hybrid firmware
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 20 Jun 2018 08:18:48 +0000
parents b870b6a44d31
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
234
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /************* Revision Controle System Header *************
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * GSM Layer 1 software
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * L1TM_CUST.C
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 *
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 * Filename %M%
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 * Version %I%
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 * Date %G%
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 *
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 ************* Revision Controle System Header *************/
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 #include "l1_confg.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 #if TESTMODE
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 #include "tm_defs.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 #include "l1_const.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 #include "l1_types.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 #include "l1tm_defty.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 #include "l1tm_cust.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 #if (AUDIO_TASK == 1)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 #include "l1audio_const.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 #include "l1audio_cust.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 #include "l1audio_defty.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 #endif
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 #if (L1_GTT == 1)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 #include "l1gtt_const.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 #include "l1gtt_defty.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 #endif
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 #include "l1_defty.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 #include "l1_msgty.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 #include "l1_tabs.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 #include "l1tm_msgty.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 #include "l1tm_varex.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 #include "abb.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 #if (RF==35)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 #include "tpudrv35.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 #include "l1_rf35.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 #endif
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 #if (RF==12)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 #include "tpudrv12.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 #include "l1_rf12.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 #endif
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 #if (RF==10)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 #include "tpudrv10.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 #include "l1_rf10.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 #endif
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 #if (RF==8)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 #include "tpudrv8.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 #include "l1_rf8.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 #endif
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 #if (RF==2)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 #include "l1_rf2.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 #endif
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 #include <string.h>
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 // Import band configuration from Flash module (need to replace by an access function)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 //extern UWORD8 std;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 extern T_L1_CONFIG l1_config;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 extern T_RF rf;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 extern T_RF_BAND rf_band[GSM_BANDS];
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 extern UWORD16 AGC_TABLE[AGC_TABLE_SIZE];
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 extern T_ADC adc;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 extern T_ADCCAL adc_cal;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 extern UWORD16 TM_ul_data[16]; //Uplink data to be stored into ABB Uplink buffer
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 extern T_STD_CONFIG std_config[];
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 static UWORD8 tm_band = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 // External function prototypes
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 void get_cal_from_nvmem (UWORD8 *ptr, UWORD16 len, UWORD8 id);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 UWORD8 save_cal_in_nvmem (UWORD8 *ptr, UWORD16 len, UWORD8 id);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 void Cust_init_std(void);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 void l1_tpu_init_light(void);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 enum {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 TM_RF_ID = 0,
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 TM_ADC_ID = 1
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 };
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 typedef signed char effs_t;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 // external FFS function prototypes
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 effs_t ffs_mkdir(const char *pathname);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 void config_ffs_write(char type);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 /***********************************************************************/
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 /* TESTMODE 4.X */
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 /***********************************************************************/
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 /*----------------------------------------------------------*/
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 /* Cust_tm_init() */
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 /*----------------------------------------------------------*/
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 /* Parameters : */
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 /* Return : */
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 /* Functionality : Init default configuration for TM params */
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 /*----------------------------------------------------------*/
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 void Cust_tm_init(void)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 UWORD32 i;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 l1_config.adc_enable = ADC_ENABLE; // ADC readings enabled
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 l1_config.agc_enable = AGC_ENABLE; // AGC algo enabled
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 l1_config.afc_enable = AFC_ENABLE; // AFC algo enabled
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 l1_config.tmode.rf_params.bcch_arfcn = TM_BCCH_ARFCN;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 l1_config.tmode.rf_params.tch_arfcn = TM_TCH_ARFCN;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 l1_config.tmode.rf_params.mon_arfcn = TM_MON_ARFCN;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 l1_config.tmode.rf_params.channel_type = TM_CHAN_TYPE; // TCH_F
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 l1_config.tmode.rf_params.subchannel = TM_SUB_CHAN;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 l1_config.tmode.rf_params.reload_ramps_flag = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 l1_config.tmode.rf_params.tmode_continuous = TM_NO_CONTINUOUS;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 l1_config.tmode.rx_params.slot_num = TM_SLOT_NUM; // Time Slot
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 l1_config.tmode.rx_params.agc = TM_AGC_VALUE; //This may be outside the range of the RF chip used
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 l1_config.tmode.rx_params.pm_enable = TM_PM_ENABLE;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 l1_config.tmode.rx_params.lna_off = TM_LNA_OFF;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 l1_config.tmode.rx_params.number_of_measurements = TM_NUM_MEAS;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 l1_config.tmode.rx_params.place_of_measurement = TM_WIN_MEAS;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 l1_config.tmode.tx_params.txpwr = TM_TXPWR; // Min power level for GSM900
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 l1_config.tmode.tx_params.txpwr_skip = TM_TXPWR_SKIP;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 l1_config.tmode.tx_params.timing_advance = TM_TA;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 l1_config.tmode.tx_params.burst_type = TM_BURST_TYPE; // default is normal up-link burst
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 l1_config.tmode.tx_params.burst_data = TM_BURST_DATA; // default is all zeros
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 l1_config.tmode.tx_params.tsc = TM_TSC; // Training Sequence ("BCC" on BSS)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 #if (CODE_VERSION != SIMULATION)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 l1_config.tmode.stats_config.num_loops = TM_NUM_LOOPS; // 0 actually means infinite
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 #else
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 l1_config.tmode.stats_config.num_loops = 4; // 0 actually means infinite
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 #endif
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 l1_config.tmode.stats_config.auto_result_loops = TM_AUTO_RESULT_LOOPS; // 0 actually means infinite
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 l1_config.tmode.stats_config.auto_reset_loops = TM_AUTO_RESET_LOOPS; // 0 actually means infinite
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 l1_config.tmode.stats_config.stat_type = TM_STAT_TYPE;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 l1_config.tmode.stats_config.stat_bitmask = TM_STAT_BITMASK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 #if (CODE_VERSION != SIMULATION)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 // Initialize APCDEL1 register of Omega
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 ABB_Write_Register_on_page(PAGE0, APCDEL1, (C_APCDEL1 - 0x0004) >> 6);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 #endif
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 l1tm.tm_msg_received = FALSE;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 for (i=0;i<16;i++)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 TM_ul_data[i]=0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 #if L1_GPRS
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 l1_config.tmode.rf_params.pdtch_arfcn = TM_PDTCH_ARFCN;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 l1_config.tmode.rf_params.multislot_class = TM_MULTISLOT_CLASS;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 l1_config.tmode.stats_config.stat_gprs_slots = TM_STAT_GPRS_SLOTS;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 l1_config.tmode.rx_params.timeslot_alloc = TM_RX_ALLOCATION;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 l1_config.tmode.rx_params.coding_scheme = TM_RX_CODING_SCHEME;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 l1_config.tmode.tx_params.timeslot_alloc = TM_TX_ALLOCATION;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 l1_config.tmode.tx_params.coding_scheme = TM_TX_CODING_SCHEME;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 for (i=0; i<8; i++)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 l1_config.tmode.tx_params.txpwr_gprs[i] = TM_TXPWR_GPRS;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 for (i=0; i<27; i++)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165 l1_config.tmode.tx_params.rlc_buffer[i] = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 #endif
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 /**********************************************************************/
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 /* Test mode functions used for RF calibration */
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 /**********************************************************************/
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 void Cust_tm_rf_param_write(T_TM_RETURN *tm_return, WORD16 index, UWORD16 value)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 switch (index)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 case STD_BAND_FLAG:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 UWORD8 std_temp, band_temp;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182 std_temp = value & 0xff; // tm_band = b7..0 of value
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 band_temp = value >> 8; // band = b15..8 of value
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 // get define
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185 //if (sizeof(std_config)/sizeof(T_STD_CONFIG) <= std_temp)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 if (9 <= std_temp) // std max
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188 tm_return->status = E_BADINDEX;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191 else if ( GSM_BANDS <= band_temp)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
192 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
193 tm_return->status = E_BADINDEX;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
194 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
195 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
196 else if ( BAND_NONE == std_config[std_temp].band[band_temp])
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
197 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
198 tm_return->status = E_BADINDEX;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
199 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
200 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201 else
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203 l1_config.std.id = std_temp;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204 tm_band = band_temp;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205 // update RAM struct with either default or ffs
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
206 Cust_init_std();
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
207 l1_tpu_init_light();
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
208 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
209 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
210 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
211 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
212
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
213 case INITIAL_AFC_DAC:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
214 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215 rf.afc.eeprom_afc = (WORD16) value << 3; // shift to put into F13.3 format
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
216 l1_config.params.eeprom_afc = rf.afc.eeprom_afc;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
217
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
218 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
219 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
220 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
221 default:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
222 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
223 tm_return->status = E_BADINDEX;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
224 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
225 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
226 } // end switch
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
227 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
228
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
229 void Cust_tm_rf_param_read(T_TM_RETURN *tm_return, WORD16 index)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
230 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
231 volatile UWORD16 value;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
232
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
233 switch (index)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
234 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
235 case STD_BAND_FLAG:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
236 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
237 value = ((tm_band << 8) | (l1_config.std.id) ); // return global std, tm_band (intel format)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
238 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
239 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
240 case INITIAL_AFC_DAC:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
241 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
242 value = rf.afc.eeprom_afc >> 3; // returned as F13.3
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
243 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
244 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
245 default:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
246 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
247 tm_return->size = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
248 tm_return->status = E_BADINDEX;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
249 return;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
250 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
251 } // end switch
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
252
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
253 memcpy(tm_return->result, (UWORD8 *)&value, 2);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
254 tm_return->size = 2;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
255 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
256 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
257
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
258 void Cust_tm_rf_table_write(T_TM_RETURN *tm_return, WORD8 index, UWORD8 size, UWORD8 table[])
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
259 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
260 UWORD8 band=0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
261
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
262 tm_return->index = index; // store index before it gets modified
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
263 tm_return->size = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
264
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
265 switch (index)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
266 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
267 case RX_AGC_TABLE:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
268 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
269 if (size != sizeof(AGC_TABLE))
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
270 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
271 tm_return->status = E_BADSIZE;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
272 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
273 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
274
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
275 memcpy(&AGC_TABLE[0], table, size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
276 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
277 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
278 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
279 case AFC_PARAMS:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
280 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
281
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
282 #if (VCXO_ALGO == 1)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
283 if (size != 24) // 4 UWORD32 + 4 WORD16 values
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
284 #else
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
285 if (size != 16) // 4 UWORD32 values
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
286 #endif
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
287 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
288 tm_return->status = E_BADSIZE;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
289 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
290 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
291
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
292 memcpy(&rf.afc.psi_sta_inv, table, size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
293 l1_config.params.psi_sta_inv = rf.afc.psi_sta_inv;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
294 l1_config.params.psi_st = rf.afc.psi_st;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
295 l1_config.params.psi_st_32 = rf.afc.psi_st_32;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
296 l1_config.params.psi_st_inv = rf.afc.psi_st_inv;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
297
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
298 #if (CODE_VERSION == NOT_SIMULATION)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
299 #if (VCXO_ALGO == 1)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
300 l1_config.params.afc_dac_center = rf.afc.dac_center;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
301 l1_config.params.afc_dac_min = rf.afc.dac_min;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
302 l1_config.params.afc_dac_max = rf.afc.dac_max;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
303 l1_config.params.afc_snr_thr = rf.afc.snr_thr;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
304 #endif
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
305 #endif
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
306
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
307 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
308 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
309 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
310 case RX_AGC_GLOBAL_PARAMS:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
311 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
312 if (size != 8) // 4 UWORD16 values
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
313 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
314 tm_return->status = E_BADSIZE;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
315 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
316 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
317
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
318 memcpy(&rf.rx.agc.low_agc_noise_thr, table, size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
319 l1_config.params.low_agc_noise_thr = rf.rx.agc.low_agc_noise_thr;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
320 l1_config.params.high_agc_sat_thr = rf.rx.agc.high_agc_sat_thr;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
321 l1_config.params.low_agc = rf.rx.agc.low_agc;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
322 l1_config.params.high_agc = rf.rx.agc.high_agc;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
323
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
324 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
325 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
326 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
327 case RX_IL_2_AGC_MAX:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
328 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
329 if (size != sizeof(rf.rx.agc.il2agc_max))
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
330 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
331 tm_return->status = E_BADSIZE;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
332 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
333 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
334
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
335 memcpy(&rf.rx.agc.il2agc_max[0], table, size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
336 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
337 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
338 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
339 case RX_IL_2_AGC_PWR:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
340 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
341 if (size != sizeof(rf.rx.agc.il2agc_pwr))
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
342 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
343 tm_return->status = E_BADSIZE;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
344 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
345 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
346
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
347 memcpy(&rf.rx.agc.il2agc_pwr[0], table, size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
348 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
349 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
350 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
351 case RX_IL_2_AGC_AV:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
352 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
353 if (size != sizeof(rf.rx.agc.il2agc_av))
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
354 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
355 tm_return->status = E_BADSIZE;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
356 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
357 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
358
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
359 memcpy(&rf.rx.agc.il2agc_av[0], table, size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
360 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
361 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
362 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
363 case TX_LEVELS:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
364 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
365 if (size != sizeof(rf_band[tm_band].tx.levels))
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
366 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
367 tm_return->status = E_BADSIZE;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
368 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
369 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
370
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
371 memcpy(&rf_band[tm_band].tx.levels[0], table, size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
372 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
373 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
374 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
375 case TX_CAL_CHAN: // generic for all bands
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
376 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
377 if (size != sizeof(rf_band[tm_band].tx.chan_cal_table))
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
378 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
379 tm_return->status = E_BADSIZE;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
380 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
381 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
382
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
383 memcpy(&rf_band[tm_band].tx.chan_cal_table[0][0], table, size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
384 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
385 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
386 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
387 case TX_CAL_TEMP: // generic for all bands
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
388 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
389 if (size != sizeof(rf_band[tm_band].tx.temp))
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
390 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
391 tm_return->status = E_BADSIZE;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
392 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
393 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
394
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
395 memcpy(&rf_band[tm_band].tx.temp[0], table, size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
396 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
397 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
398 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
399 case RX_CAL_CHAN: // generic for all bands
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
400 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
401 if (size != sizeof(rf_band[tm_band].rx.agc_bands))
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
402 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
403 tm_return->status = E_BADSIZE;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
404 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
405 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
406
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
407 memcpy(&rf_band[tm_band].rx.agc_bands[0], table, size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
408 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
409 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
410 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
411 case RX_CAL_TEMP: // generic for all bands
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
412 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
413 if (size != sizeof(rf_band[tm_band].rx.temp))
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
414 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
415 tm_return->status = E_BADSIZE;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
416 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
417 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
418
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
419 memcpy(&rf_band[tm_band].rx.temp[0], table, size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
420 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
421 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
422 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
423 case RX_AGC_PARAMS:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
424 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
425 if (size != sizeof(rf_band[tm_band].rx.rx_cal_params))
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
426 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
427 tm_return->status = E_BADSIZE;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
428 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
429 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
430
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
431 memcpy(&rf_band[tm_band].rx.rx_cal_params, table, size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
432 if (tm_band == 0)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
433 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
434 l1_config.std.g_magic_band1 = rf_band[tm_band].rx.rx_cal_params.g_magic;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
435 l1_config.std.lna_att_band1 = rf_band[tm_band].rx.rx_cal_params.lna_att;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
436 l1_config.std.lna_switch_thr_low_band1 = rf_band[tm_band].rx.rx_cal_params.lna_switch_thr_low;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
437 l1_config.std.lna_switch_thr_high_band1 = rf_band[tm_band].rx.rx_cal_params.lna_switch_thr_high;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
438 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
439 else if (tm_band == 1)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
440 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
441 l1_config.std.g_magic_band2 = rf_band[tm_band].rx.rx_cal_params.g_magic;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
442 l1_config.std.lna_att_band2 = rf_band[tm_band].rx.rx_cal_params.lna_att;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
443 l1_config.std.lna_switch_thr_low_band2 = rf_band[tm_band].rx.rx_cal_params.lna_switch_thr_low;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
444 l1_config.std.lna_switch_thr_high_band2 = rf_band[tm_band].rx.rx_cal_params.lna_switch_thr_high;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
445 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
446 else
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
447 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
448 tm_return->status = E_INVAL;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
449 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
450 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
451
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
452 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
453 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
454 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
455 case TX_CAL_EXTREME:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
456 case RX_CAL_LEVEL:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
457 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
458 tm_return->status = E_NOSUBSYS;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
459 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
460 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
461 #if L1_GPRS
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
462 case RLC_TX_BUFFER_CS1:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
463 case RLC_TX_BUFFER_CS2:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
464 case RLC_TX_BUFFER_CS3:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
465 case RLC_TX_BUFFER_CS4:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
466 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
467 UWORD8 i, buffer_size;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
468
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
469 tm_return->index = index; // store index before it gets modified
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
470 tm_return->size = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
471
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
472 buffer_size = size/2 + size%2; // bytes will be concatenated into UWORD16
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
473
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
474 if (buffer_size > 27) //max. number of data bytes
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
475 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
476 tm_return->status = E_BADSIZE;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
477 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
478 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
479
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
480 // make sure that last byte is zero in case of odd number of bytes
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
481 table[size] = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
482
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
483 // init the whole buffer before downloading new data
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
484 for (i=0; i<27; i++)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
485 l1_config.tmode.tx_params.rlc_buffer[i] = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
486
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
487 for (i=0; i<buffer_size; i++)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
488 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
489 l1_config.tmode.tx_params.rlc_buffer[i] = (table[2*i+1] << 8) | table[2*i];
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
490 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
491 l1_config.tmode.tx_params.rlc_buffer_size = buffer_size;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
492
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
493 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
494 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
495 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
496 #endif
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
497 case TX_DATA_BUFFER:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
498 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
499 UWORD8 i;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
500
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
501 tm_return->index = index; // store index before it gets modified
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
502 tm_return->size = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
503
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
504 if (size != 32) // 16 UWORD16 (containing 10 data bits each)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
505 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
506 tm_return->status = E_BADSIZE;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
507 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
508 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
509
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
510 memcpy(&TM_ul_data, table, size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
511
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
512 for (i=0; i<16; i++)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
513 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
514 TM_ul_data[i] = TM_ul_data[i] << 6;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
515 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
516
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
517 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
518 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
519 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
520 default:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
521 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
522 tm_return->status = E_BADINDEX;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
523 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
524 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
525 } // end switch
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
526 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
527
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
528 void Cust_tm_rf_table_read(T_TM_RETURN *tm_return, WORD8 index)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
529 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
530 switch (index)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
531 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
532 case RX_AGC_TABLE:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
533 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
534 tm_return->size = sizeof(AGC_TABLE);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
535 memcpy(tm_return->result, &AGC_TABLE[0], tm_return->size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
536 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
537 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
538 case AFC_PARAMS:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
539 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
540 #if (VCXO_ALGO == 1)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
541 tm_return->size = 24; // 4 UWORD32's + 4 WORD16
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
542 #else
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
543 tm_return->size = 16; // 4 UWORD32's
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
544 #endif
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
545 memcpy(tm_return->result, &rf.afc.psi_sta_inv, tm_return->size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
546 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
547 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
548 case RX_AGC_GLOBAL_PARAMS:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
549 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
550 tm_return->size = 8; // 4 UWORD16's
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
551 memcpy(tm_return->result, &rf.rx.agc.low_agc_noise_thr, tm_return->size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
552
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
553 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
554 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
555 case RX_IL_2_AGC_MAX:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
556 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
557 tm_return->size = sizeof(rf.rx.agc.il2agc_max);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
558 memcpy(tm_return->result, &rf.rx.agc.il2agc_max[0], tm_return->size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
559 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
560 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
561 case RX_IL_2_AGC_PWR:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
562 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
563 tm_return->size = sizeof(rf.rx.agc.il2agc_pwr);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
564 memcpy(tm_return->result, &rf.rx.agc.il2agc_pwr[0], tm_return->size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
565 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
566 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
567 case RX_IL_2_AGC_AV:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
568 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
569 tm_return->size = sizeof(rf.rx.agc.il2agc_av);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
570 memcpy(tm_return->result, &rf.rx.agc.il2agc_av[0], tm_return->size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
571 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
572 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
573 case TX_LEVELS:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
574 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
575 tm_return->size = sizeof(rf_band[tm_band].tx.levels);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
576 memcpy(tm_return->result, &rf_band[tm_band].tx.levels[0], tm_return->size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
577 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
578 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
579 case TX_CAL_CHAN: // generic for all bands
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
580 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
581 tm_return->size = sizeof(rf_band[tm_band].tx.chan_cal_table);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
582 memcpy(tm_return->result, &rf_band[tm_band].tx.chan_cal_table[0][0], tm_return->size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
583 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
584 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
585 case TX_CAL_TEMP: // generic for all bands
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
586 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
587 tm_return->size = sizeof(rf_band[tm_band].tx.temp);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
588 memcpy(tm_return->result, &rf_band[tm_band].tx.temp[0], tm_return->size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
589 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
590 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
591 case RX_CAL_CHAN: // generic for all bands
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
592 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
593 tm_return->size = sizeof(rf_band[tm_band].rx.agc_bands);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
594 memcpy(tm_return->result, &rf_band[tm_band].rx.agc_bands[0], tm_return->size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
595 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
596 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
597 case RX_CAL_TEMP: // generic for all bands
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
598 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
599 tm_return->size = sizeof(rf_band[tm_band].rx.temp);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
600 memcpy(tm_return->result, &rf_band[tm_band].rx.temp[0], tm_return->size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
601 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
602 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
603 case RX_AGC_PARAMS:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
604 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
605 // WARNING: sizeof(rf.rx.rx_cal_params[band]) returns 12 because of alignment
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
606 tm_return->size = 10; // five UWORD16's
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
607 memcpy(tm_return->result, &rf_band[tm_band].rx.rx_cal_params, tm_return->size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
608 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
609 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
610 case TX_CAL_EXTREME:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
611 case RX_CAL_LEVEL:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
612 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
613 tm_return->size = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
614 tm_return->status = E_NOSUBSYS;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
615 return;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
616 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
617
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
618 #if L1_GPRS
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
619 case RLC_TX_BUFFER_CS1:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
620 case RLC_TX_BUFFER_CS2:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
621 case RLC_TX_BUFFER_CS3:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
622 case RLC_TX_BUFFER_CS4:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
623 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
624 tm_return->size = l1_config.tmode.tx_params.rlc_buffer_size * 2; // UWORD16's
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
625 memcpy(tm_return->result, &l1_config.tmode.tx_params.rlc_buffer[0], tm_return->size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
626 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
627 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
628 #endif
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
629
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
630 case TX_DATA_BUFFER:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
631 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
632 UWORD8 i;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
633 for (i=0; i<16; i++)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
634 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
635 tm_return->result[2*i]=(TM_ul_data[i] >> 6) & 0x00FF;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
636 tm_return->result[2*i+1]=(TM_ul_data[i] >> 14) & 0x0003;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
637 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
638
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
639 tm_return->size = 32; //16*UWORD16
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
640 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
641 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
642
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
643 #if (RF==35)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
644 case RX_PLL_TUNING_TABLE:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
645 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
646 tm_return->size = sizeof(pll_tuning); //6*UWORD16
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
647 memcpy(tm_return->result, &pll_tuning, tm_return->size);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
648 pll_tuning.enable = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
649 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
650 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
651 #endif
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
652
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
653 default:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
654 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
655 tm_return->size = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
656 tm_return->status = E_BADINDEX;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
657 return;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
658 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
659 } // end switch
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
660
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
661 tm_return->index = index;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
662 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
663 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
664
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
665 void Cust_tm_rx_param_write(T_TM_RETURN *tm_return, WORD16 index, UWORD16 value)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
666 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
667 switch (index)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
668 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
669 case RX_FRONT_DELAY:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
670 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
671 //delay for dual band not implemented yet
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
672 rf.tx.prg_tx = value;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
673 l1_config.params.prg_tx_gsm = rf.tx.prg_tx;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
674 l1_config.params.prg_tx_dcs = rf.tx.prg_tx;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
675
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
676 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
677 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
678 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
679 default:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
680 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
681 tm_return->status = E_BADINDEX;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
682 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
683 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
684 } // end switch
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
685 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
686
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
687 void Cust_tm_rx_param_read(T_TM_RETURN *tm_return, WORD16 index)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
688 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
689 volatile UWORD16 value;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
690
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
691 switch (index)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
692 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
693 case RX_FRONT_DELAY:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
694 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
695 value = rf.tx.prg_tx;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
696 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
697 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
698 default:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
699 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
700 tm_return->status = E_BADINDEX;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
701 tm_return->size = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
702 return;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
703 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
704 } // end switch
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
705
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
706 memcpy(tm_return->result, (UWORD8 *)&value, 2);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
707 tm_return->size = 2;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
708 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
709 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
710
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
711 void Cust_tm_tx_param_write(T_TM_RETURN *tm_return, WORD16 index, UWORD16 value, UWORD8 band)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
712 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
713 switch (index)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
714 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
715 case TX_APC_DAC:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
716 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
717 // generic for all bands
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
718 rf_band[tm_band].tx.levels[l1_config.tmode.tx_params.txpwr].apc = value;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
719
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
720 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
721 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
722 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
723 case TX_RAMP_TEMPLATE:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
724 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
725 if (value >= sizeof(rf_band[tm_band].tx.ramp_tables)/sizeof(rf_band[tm_band].tx.ramp_tables[0])) // [0..15]
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
726 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
727 tm_return->status = E_INVAL;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
728 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
729 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
730
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
731 // generic for all bands
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
732 rf_band[tm_band].tx.levels[l1_config.tmode.tx_params.txpwr].ramp_index = value;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
733
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
734 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
735 l1_config.tmode.rf_params.reload_ramps_flag = 1;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
736 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
737 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
738 case TX_CHAN_CAL_TABLE:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
739 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
740 if (value >= sizeof(rf_band[tm_band].tx.chan_cal_table)/sizeof(rf_band[tm_band].tx.chan_cal_table[0]))
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
741 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
742 tm_return->status = E_INVAL;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
743 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
744 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
745
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
746 // generic for all bands
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
747 rf_band[tm_band].tx.levels[l1_config.tmode.tx_params.txpwr].chan_cal_index = value;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
748
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
749 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
750
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
751 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
752 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
753 case TX_BURST_TYPE:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
754 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
755 if (value > 1) // [0..1]
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
756 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
757 tm_return->status = E_INVAL;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
758 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
759 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
760 l1_config.tmode.tx_params.burst_type = value;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
761 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
762 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
763 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
764 case TX_BURST_DATA:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
765 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
766 // range is [0..10], currently we support [0..13] at the moment
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
767 if (value > 13)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
768 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
769 tm_return->status = E_INVAL;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
770 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
771 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
772 l1_config.tmode.tx_params.burst_data = value;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
773 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
774 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
775 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
776 case TX_TRAINING_SEQ:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
777 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
778 if (value > 7) // [0..7]
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
779 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
780 tm_return->status = E_INVAL;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
781 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
782 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
783 l1_config.tmode.tx_params.tsc = value;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
784 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
785 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
786 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
787 default:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
788 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
789 tm_return->status = E_BADINDEX;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
790 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
791 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
792 } // end switch
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
793 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
794
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
795 void Cust_tm_tx_param_read(T_TM_RETURN *tm_return, WORD16 index, UWORD8 band)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
796 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
797 volatile UWORD16 value;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
798
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
799 switch (index)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
800 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
801 case TX_PWR_LEVEL:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
802 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
803 value = l1_config.tmode.tx_params.txpwr;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
804 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
805 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
806 case TX_APC_DAC:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
807 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
808 value = rf_band[tm_band].tx.levels[l1_config.tmode.tx_params.txpwr].apc;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
809 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
810 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
811 case TX_RAMP_TEMPLATE:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
812 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
813 value = rf_band[tm_band].tx.levels[l1_config.tmode.tx_params.txpwr].ramp_index;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
814 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
815 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
816 case TX_CHAN_CAL_TABLE:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
817 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
818 value = rf_band[tm_band].tx.levels[l1_config.tmode.tx_params.txpwr].chan_cal_index;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
819 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
820 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
821 case TX_BURST_TYPE:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
822 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
823 value = l1_config.tmode.tx_params.burst_type;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
824 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
825 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
826 case TX_BURST_DATA:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
827 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
828 value = l1_config.tmode.tx_params.burst_data;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
829 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
830 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
831 case TX_TIMING_ADVANCE:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
832 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
833 value = l1_config.tmode.tx_params.timing_advance;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
834 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
835 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
836 case TX_TRAINING_SEQ:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
837 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
838 value = l1_config.tmode.tx_params.tsc;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
839 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
840 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
841 case TX_PWR_SKIP:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
842 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
843 value = l1_config.tmode.tx_params.txpwr_skip;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
844 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
845 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
846 #if L1_GPRS
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
847 case TX_GPRS_POWER0:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
848 case TX_GPRS_POWER1:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
849 case TX_GPRS_POWER2:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
850 case TX_GPRS_POWER3:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
851 case TX_GPRS_POWER4:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
852 case TX_GPRS_POWER5:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
853 case TX_GPRS_POWER6:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
854 case TX_GPRS_POWER7:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
855 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
856 value = l1_config.tmode.tx_params.txpwr_gprs[index - TX_GPRS_POWER0];
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
857 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
858 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
859 case TX_GPRS_SLOTS:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
860 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
861 value = l1_config.tmode.tx_params.timeslot_alloc;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
862 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
863 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
864 case TX_GPRS_CODING:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
865 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
866 value = l1_config.tmode.tx_params.coding_scheme;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
867 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
868 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
869 #endif
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
870 default:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
871 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
872 tm_return->status = E_BADINDEX;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
873 tm_return->size = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
874 return;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
875 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
876 } // end switch
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
877
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
878 memcpy(tm_return->result, (UWORD8 *)&value, 2);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
879 tm_return->size = 2;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
880 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
881 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
882
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
883 void Cust_tm_tx_template_write(T_TM_RETURN *tm_return, WORD8 index, UWORD8 size, UWORD8 table[])
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
884 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
885 if (index >= sizeof(rf_band[tm_band].tx.ramp_tables)/sizeof(T_TX_RAMP))
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
886 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
887 tm_return->status = E_BADINDEX;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
888 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
889 else if (size != sizeof(T_TX_RAMP))
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
890 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
891 // We are writing both the up and down ramps; size must be exact.
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
892 tm_return->status = E_BADSIZE;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
893 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
894 else
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
895 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
896 memcpy(rf_band[tm_band].tx.ramp_tables[index].ramp_up, &table[0], size/2);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
897 memcpy(rf_band[tm_band].tx.ramp_tables[index].ramp_down, &table[size/2], size/2);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
898 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
899 l1_config.tmode.rf_params.reload_ramps_flag = 1;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
900 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
901
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
902 tm_return->index = index;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
903 tm_return->size = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
904 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
905
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
906 void Cust_tm_tx_template_read(T_TM_RETURN *tm_return, WORD8 index)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
907 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
908 tm_return->index = index;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
909
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
910 if (index >= sizeof(rf_band[tm_band].tx.ramp_tables)/sizeof(T_TX_RAMP))
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
911 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
912 tm_return->status = E_BADINDEX;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
913 tm_return->size = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
914 return;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
915 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
916
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
917 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));
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
918 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));
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
919 tm_return->size = sizeof(rf_band[tm_band].tx.ramp_tables[index]);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
920 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
921 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
922
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
923 void Cust_tm_misc_param_write(T_TM_RETURN *tm_return, WORD16 index, UWORD16 value)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
924 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
925 switch (index)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
926 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
927 case GPIOSTATE0:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
928 case GPIODIR0:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
929 case GPIOSTATE1:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
930 case GPIODIR1:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
931 case GPIOSTATE0P:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
932 case GPIODIR0P:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
933 case GPIOSTATE1P:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
934 case GPIODIR1P:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
935 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
936 tm_return->status = E_NOSUBSYS;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
937 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
938 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
939 case CONVERTED_ADC0:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
940 case CONVERTED_ADC1:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
941 case CONVERTED_ADC2:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
942 case CONVERTED_ADC3:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
943 case CONVERTED_ADC4:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
944 case CONVERTED_ADC5:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
945 case CONVERTED_ADC6:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
946 case CONVERTED_ADC7:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
947 case CONVERTED_ADC8:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
948 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
949 adc.converted[index - CONVERTED_ADC0] = value;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
950 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
951 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
952 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
953
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
954 case RAW_ADC0:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
955 case RAW_ADC1:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
956 case RAW_ADC2:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
957 case RAW_ADC3:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
958 case RAW_ADC4:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
959 case RAW_ADC5:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
960 case RAW_ADC6:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
961 case RAW_ADC7:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
962 case RAW_ADC8:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
963 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
964 adc.raw[index - RAW_ADC0] = value;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
965 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
966 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
967 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
968
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
969 case ADC0_COEFF_A:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
970 case ADC1_COEFF_A:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
971 case ADC2_COEFF_A:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
972 case ADC3_COEFF_A:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
973 case ADC4_COEFF_A:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
974 case ADC5_COEFF_A:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
975 case ADC6_COEFF_A:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
976 case ADC7_COEFF_A:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
977 case ADC8_COEFF_A:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
978 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
979 adc_cal.a[index - ADC0_COEFF_A] = value;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
980 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
981 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
982 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
983
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
984 case ADC0_COEFF_B:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
985 case ADC1_COEFF_B:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
986 case ADC2_COEFF_B:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
987 case ADC3_COEFF_B:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
988 case ADC4_COEFF_B:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
989 case ADC5_COEFF_B:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
990 case ADC6_COEFF_B:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
991 case ADC7_COEFF_B:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
992 case ADC8_COEFF_B:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
993 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
994 adc_cal.b[index - ADC0_COEFF_B] = value;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
995 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
996 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
997 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
998 case SLEEP_MODE:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
999 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1000 tm_return->status = E_NOSUBSYS;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1001 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1002 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1003 default:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1004 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1005 tm_return->status = E_BADINDEX;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1006 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1007 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1008 } // end switch
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1009 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1010
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1011 void Cust_tm_misc_param_read(T_TM_RETURN *tm_return, WORD16 index)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1012 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1013 volatile UWORD16 value;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1014
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1015 switch (index)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1016 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1017 case GPIOSTATE0:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1018 case GPIODIR0:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1019 case GPIOSTATE1:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1020 case GPIODIR1:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1021 case GPIOSTATE0P:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1022 case GPIODIR0P:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1023 case GPIOSTATE1P:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1024 case GPIODIR1P:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1025 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1026 tm_return->status = E_NOSUBSYS;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1027 tm_return->size = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1028 return;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1029 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1030 case CONVERTED_ADC0:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1031 case CONVERTED_ADC1:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1032 case CONVERTED_ADC2:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1033 case CONVERTED_ADC3:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1034 case CONVERTED_ADC4:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1035 case CONVERTED_ADC5:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1036 case CONVERTED_ADC6:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1037 case CONVERTED_ADC7:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1038 case CONVERTED_ADC8:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1039 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1040 value = adc.converted[index - CONVERTED_ADC0];
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1041 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1042 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1043 case RAW_ADC0:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1044 case RAW_ADC1:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1045 case RAW_ADC2:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1046 case RAW_ADC3:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1047 case RAW_ADC4:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1048 case RAW_ADC5:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1049 case RAW_ADC6:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1050 case RAW_ADC7:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1051 case RAW_ADC8:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1052 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1053 value = adc.raw[index - RAW_ADC0];
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1054 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1055 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1056 case ADC0_COEFF_A:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1057 case ADC1_COEFF_A:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1058 case ADC2_COEFF_A:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1059 case ADC3_COEFF_A:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1060 case ADC4_COEFF_A:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1061 case ADC5_COEFF_A:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1062 case ADC6_COEFF_A:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1063 case ADC7_COEFF_A:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1064 case ADC8_COEFF_A:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1065 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1066 value = adc_cal.a[index - ADC0_COEFF_A];
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1067 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1068 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1069 case ADC0_COEFF_B:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1070 case ADC1_COEFF_B:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1071 case ADC2_COEFF_B:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1072 case ADC3_COEFF_B:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1073 case ADC4_COEFF_B:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1074 case ADC5_COEFF_B:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1075 case ADC6_COEFF_B:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1076 case ADC7_COEFF_B:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1077 case ADC8_COEFF_B:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1078 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1079 value = adc_cal.b[index - ADC0_COEFF_B];
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1080 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1081 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1082 case SLEEP_MODE:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1083 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1084 tm_return->status = E_NOSUBSYS;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1085 tm_return->size = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1086 return;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1087 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1088 default:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1089 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1090 tm_return->status = E_BADINDEX;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1091 tm_return->size = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1092 return;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1093 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1094 } // end switch
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1095
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1096 memcpy(tm_return->result, (UWORD8 *)&value, 2);
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1097 tm_return->size = 2;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1098 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1099 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1100
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1101 void Cust_tm_misc_enable(T_TM_RETURN *tm_return, WORD16 action)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1102 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1103 UWORD8 status;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1104
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1105 // FIXME: This enum really should go into testmode header file.
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1106 enum ME_CFG_WRITE_E {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1107 CFG_WRITE_MKDIRS = 100,
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1108 CFG_WRITE_RF_CAL = 102,
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1109 CFG_WRITE_RF_CFG = 103,
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1110 CFG_WRITE_TX_CAL = 104,
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1111 CFG_WRITE_TX_CFG = 105,
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1112 CFG_WRITE_RX_CAL = 106,
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1113 CFG_WRITE_RX_CFG = 107,
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1114 CFG_WRITE_SYS_CAL = 108,
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1115 CFG_WRITE_SYS_CFG = 109
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1116 };
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1117
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1118 tm_return->size = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1119 tm_return->index = action;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1120 tm_return->status = E_OK;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1121
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1122 // FIXME: This code should actually be in misc_enable()
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1123 switch(action)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1124 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1125 case CFG_WRITE_MKDIRS:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1126 ffs_mkdir("/gsm");
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1127 ffs_mkdir("/pcm");
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1128 ffs_mkdir("/sys");
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1129 ffs_mkdir("/mmi");
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1130 ffs_mkdir("/vos");
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1131 ffs_mkdir("/var");
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1132 ffs_mkdir("/gsm/rf");
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1133 ffs_mkdir("/gsm/com");
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1134 ffs_mkdir("/vos/vm");
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1135 ffs_mkdir("/vos/vrm");
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1136 ffs_mkdir("/vos/vrp");
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1137 ffs_mkdir("/var/log");
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1138 ffs_mkdir("/var/tst");
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1139 ffs_mkdir("/gsm/rf/tx");
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1140 ffs_mkdir("/gsm/rf/rx");
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1141 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1142 case CFG_WRITE_RF_CAL: config_ffs_write('f'); break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1143 case CFG_WRITE_RF_CFG: config_ffs_write('F'); break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1144 case CFG_WRITE_TX_CAL: config_ffs_write('t'); break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1145 case CFG_WRITE_TX_CFG: config_ffs_write('T'); break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1146 case CFG_WRITE_RX_CAL: config_ffs_write('r'); break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1147 case CFG_WRITE_RX_CFG: config_ffs_write('R'); break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1148 case CFG_WRITE_SYS_CAL: config_ffs_write('s'); break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1149 case CFG_WRITE_SYS_CFG: config_ffs_write('S'); break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1150 default:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1151 tm_return->status = E_BADINDEX;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1152 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1153 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1154
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1155 void Cust_tm_special_param_write(T_TM_RETURN *tm_return, WORD16 index, UWORD16 value)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1156 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1157 tm_return->size = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1158 tm_return->index = index;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1159 tm_return->status = E_NOSYS;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1160 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1161
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1162 void Cust_tm_special_param_read(T_TM_RETURN *tm_return, WORD16 index)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1163 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1164 tm_return->size = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1165 tm_return->index = index;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1166 tm_return->status = E_NOSYS;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1167 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1168
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1169 void Cust_tm_special_table_write(T_TM_RETURN *tm_return, WORD8 index, UWORD8 size, UWORD8 table[])
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1170 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1171 tm_return->size = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1172 tm_return->index = index;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1173 tm_return->status = E_NOSYS;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1174 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1175
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1176 void Cust_tm_special_table_read(T_TM_RETURN *tm_return, WORD8 index)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1177 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1178 tm_return->size = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1179 tm_return->index = index;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1180 tm_return->status = E_NOSYS;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1181 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1182
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1183 void Cust_tm_special_enable(T_TM_RETURN *tm_return, WORD16 action)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1184 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1185 tm_return->size = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1186 tm_return->index = action;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1187 tm_return->status = E_NOSYS;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1188 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1189
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1190 #endif // TESTMODE