FreeCalypso > hg > tcs211-l1-reconst
annotate chipsetsw/layer1/cfile/l1_drive.c @ 95:6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Thu, 07 Apr 2016 15:27:27 +0000 |
parents | 9348cbd02cab |
children | 065ebe468750 |
rev | line source |
---|---|
94
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1 /************* Revision Controle System Header ************* |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2 * GSM Layer 1 software |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
3 * L1_DRIVE.C |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
4 * |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
5 * Filename l1_drive.c |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
6 * Copyright 2003 (C) Texas Instruments |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
7 * |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
8 ************* Revision Controle System Header *************/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
9 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
10 #define L1_DRIVE_C |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
11 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
12 #include "l1_confg.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
13 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
14 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
15 #include "apc.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
16 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
17 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
18 #if ((W_A_WAIT_DSP_RESTART_AFTER_VOCODER_ENABLE ==1)&&(W_A_DSP_PR20037 == 1)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
19 #include "nucleus.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
20 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
21 #include "l1_macro.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
22 #if (CODE_VERSION == SIMULATION) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
23 #include <string.h> |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
24 #include "l1_types.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
25 #include "sys_types.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
26 #include "l1_const.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
27 #include "l1_time.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
28 #if TESTMODE |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
29 #include "l1tm_defty.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
30 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
31 #if (AUDIO_TASK == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
32 #include "l1audio_const.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
33 #include "l1audio_cust.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
34 #include "l1audio_defty.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
35 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
36 #if (L1_GTT == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
37 #include "l1gtt_const.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
38 #include "l1gtt_defty.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
39 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
40 #if (L1_MP3 == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
41 #include "l1mp3_defty.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
42 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
43 #if (L1_MIDI == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
44 #include "l1midi_defty.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
45 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
46 //ADDED FOR AAC |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
47 #if (L1_AAC == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
48 #include "l1aac_defty.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
49 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
50 #include "l1_defty.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
51 #include "l1_varex.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
52 #include "cust_os.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
53 #include "l1_msgty.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
54 #if TESTMODE |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
55 #include "l1tm_varex.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
56 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
57 #if L2_L3_SIMUL |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
58 #include "hw_debug.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
59 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
60 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
61 #if L1_GPRS |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
62 #include "l1p_cons.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
63 #include "l1p_msgt.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
64 #include "l1p_deft.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
65 #include "l1p_vare.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
66 #include "l1p_sign.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
67 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
68 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
69 #include <stdio.h> |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
70 #include "sim_cfg.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
71 #include "sim_cons.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
72 #include "sim_def.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
73 #include "sim_var.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
74 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
75 #include "l1_ctl.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
76 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
77 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
78 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
79 #include <string.h> |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
80 #include "l1_types.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
81 #include "sys_types.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
82 #include "l1_const.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
83 #include "l1_time.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
84 #if TESTMODE |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
85 #include "l1tm_defty.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
86 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
87 #if (AUDIO_TASK == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
88 #include "l1audio_const.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
89 #include "l1audio_cust.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
90 #include "l1audio_defty.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
91 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
92 #if (L1_GTT == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
93 #include "l1gtt_const.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
94 #include "l1gtt_defty.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
95 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
96 #if (L1_MP3 == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
97 #include "l1mp3_defty.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
98 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
99 #if (L1_MIDI == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
100 #include "l1midi_defty.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
101 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
102 //ADDED FOR AAC |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
103 #if (L1_AAC == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
104 #include "l1aac_defty.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
105 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
106 #include "l1_defty.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
107 #include "l1_varex.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
108 #include "cust_os.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
109 #include "l1_msgty.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
110 #if TESTMODE |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
111 #include "l1tm_varex.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
112 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
113 #if L2_L3_SIMUL |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
114 #include "hw_debug.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
115 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
116 #include "tpudrv.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
117 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
118 #if L1_GPRS |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
119 #include "l1p_cons.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
120 #include "l1p_msgt.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
121 #include "l1p_deft.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
122 #include "l1p_vare.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
123 #include "l1p_sign.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
124 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
125 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
126 #include "l1_ctl.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
127 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
128 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
129 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
130 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
131 #include "tpudrv61.h" |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
132 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
133 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
134 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
135 |
95
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
136 /* |
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
137 * Prototypes of external functions used in this file. |
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
138 * |
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
139 * FreeCalypso change: removed all those prototypes which appear |
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
140 * in tpudrv.h, and kept only the additional ones. |
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
141 */ |
94
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
142 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
143 #if ((REL99 == 1) && (FF_BHO == 1)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
144 #if (L1_MADC_ON == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
145 void l1dmacro_rx_fbsb (SYS_UWORD16 radio_freq,UWORD8 adc_active); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
146 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
147 void l1dmacro_rx_fbsb (SYS_UWORD16 radio_freq); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
148 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
149 #endif//#if ((REL99 == 1) && (FF_BHO == 1)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
150 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
151 void Cust_get_ramp_tab(API *a_ramp, UWORD8 txpwr_ramp_up, UWORD8 txpwr_ramp_down, UWORD16 radio_freq); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
152 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3) || (RF_FAM == 61)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
153 UWORD16 Cust_get_pwr_data(UWORD8 txpwr, UWORD16 radio_freq |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
154 #if(REL99 && FF_PRF) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
155 ,UWORD8 number_uplink_timeslot |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
156 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
157 ); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
158 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
159 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
160 #if L1_GPRS |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
161 void l1ps_reset_db_mcu_to_dsp(T_DB_MCU_TO_DSP_GPRS *page_ptr); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
162 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
163 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
164 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
165 /* l1ddsp_load_info() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
166 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
167 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
168 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
169 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
170 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
171 void l1ddsp_load_info(UWORD32 task, API *info_ptr, UWORD8 *data) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
172 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
173 if(task == RACH_DSP_TASK) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
174 // RACH info. format is only 2 words... |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
175 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
176 info_ptr[0] = ((API)(data[0])) | ((API)(data[1])<<8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
177 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
178 else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
179 // Fill mcu-dsp comm. buffer. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
180 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
181 UWORD8 i,j; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
182 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
183 // Fill data block Header... |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
184 info_ptr[0] = (1 << B_BLUD); // 1st word: Set B_BLU bit. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
185 info_ptr[1] = 0; // 2nd word: cleared. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
186 info_ptr[2] = 0; // 3rd word: cleared. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
187 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
188 if((info_ptr == l1s_dsp_com.dsp_ndb_ptr->a_du_0) || |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
189 (info_ptr == l1s_dsp_com.dsp_ndb_ptr->a_du_1)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
190 // DATA traffic buffers: size of buffer is 260 bit -> 17 words but DATA traffic uses |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
191 // only a max of 240 bit (30 bytes) -> 15 words. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
192 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
193 for (i=0, j=(3+0); j<(3+15); j++) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
194 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
195 info_ptr[j] = ((API)(data[i])) | ((API)(data[i+1]) << 8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
196 i += 2; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
197 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
198 #if (TRACE_TYPE==3) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
199 if (l1_stats.type == PLAY_UL) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
200 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
201 for (i=0, j=(3+0); j<(3+17); j++) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
202 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
203 info_ptr[j] = ((API)(data[i])) | |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
204 ((API)(data[i]) << 8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
205 i ++; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
206 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
207 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
208 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
209 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
210 else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
211 // Data block for control purpose is 184 bit length: 23 bytes: 12 words (16 bit/word). |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
212 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
213 // Copy first 22 bytes in the first 11 words after header. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
214 for (i=0, j=(3+0); j<(3+11); j++) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
215 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
216 info_ptr[j] = ((API)(data[i])) | ((API)(data[i+1]) << 8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
217 i += 2; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
218 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
219 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
220 // Copy last UWORD8 (23rd) in the 12th word after header. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
221 info_ptr[14] = data[22]; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
222 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
223 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
224 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
225 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
226 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
227 /* l1ddsp_load_monit_task() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
228 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
229 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
230 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
231 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
232 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
233 void l1ddsp_load_monit_task(API monit_task, API fb_mode) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
234 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
235 l1s_dsp_com.dsp_db_w_ptr->d_task_md = monit_task; // Write number of measurements |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
236 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
237 if(l1a_l1s_com.mode == CS_MODE) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
238 l1s_dsp_com.dsp_ndb_ptr->d_fb_mode = fb_mode; // Write FB detection algo. mode. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
239 else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
240 l1s_dsp_com.dsp_ndb_ptr->d_fb_mode = 1; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
241 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
242 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
243 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
244 /* --------------------------------------------------- */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
245 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
246 /* Locosto Changes....*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
247 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
248 // Parameters: UWORD16 afcval |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
249 // Return :Void |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
250 //Functionality: TPU to accept the afcvalue from the MCU and copy it |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
251 //to the mem_xtal before triggering of AFC Script in DRP |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
252 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
253 #if(RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
254 void l1dtpu_load_afc(UWORD16 afc) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
255 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
256 l1dmacro_afc(afc, 0); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
257 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
258 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
259 /* --------------------------------------------------- */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
260 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
261 /* Locosto Changes....*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
262 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
263 /* Parameters: API dco_algo_ctl_sb */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
264 /* Functionality: Loads the API d_dco_ctl_algo_sb in the API |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
265 This should be called after updating the value in the API via cust_Get_dco_algo_ctl(...) */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
266 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
267 /* --------------------------------------------------- */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
268 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
269 void l1ddsp_load_dco_ctl_algo_sb (UWORD16 dco_ctl_algo) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
270 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
271 #if (DSP == 38) || (DSP == 39) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
272 l1s_dsp_com.dsp_db_common_w_ptr->d_dco_algo_ctrl_sb = (API) dco_ctl_algo; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
273 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
274 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
275 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
276 /* --------------------------------------------------- */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
277 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
278 /* Locosto Changes....*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
279 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
280 /* Parameters: API dco_algo_ctl_nb */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
281 /* Functionality: Loads the API d_dco_ctl_algo_nb in the API |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
282 This should be called after updating the value in the API via cust_Get_dco_algo_ctl(...) */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
283 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
284 /* --------------------------------------------------- */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
285 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
286 void l1ddsp_load_dco_ctl_algo_nb (UWORD16 dco_ctl_algo) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
287 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
288 #if (DSP == 38) || (DSP == 39) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
289 l1s_dsp_com.dsp_db_common_w_ptr->d_dco_algo_ctrl_nb = (API) dco_ctl_algo; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
290 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
291 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
292 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
293 /* --------------------------------------------------- */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
294 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
295 /* Locosto Changes....*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
296 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
297 /* Parameters: API dco_algo_ctl_pw */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
298 /* Functionality: Loads the API d_dco_ctl_algo_pw in the API |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
299 This should be called after updating the value in the API via cust_Get_dco_algo_ctl(...) */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
300 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
301 /* --------------------------------------------------- */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
302 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
303 void l1ddsp_load_dco_ctl_algo_pw (UWORD16 dco_ctl_algo) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
304 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
305 #if (DSP == 38) || (DSP == 39) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
306 l1s_dsp_com.dsp_db_common_w_ptr->d_dco_algo_ctrl_pw = (API) dco_ctl_algo; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
307 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
308 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
309 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
310 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
311 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
312 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
313 /* l1ddsp_load_afc() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
314 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
315 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
316 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
317 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
318 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
319 void l1ddsp_load_afc(API afc) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
320 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
321 #if (L1_EOTD==1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
322 // NEW !!! For EOTD measurements in IDLE mode only, cut AFC updates.... |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
323 #if (L1_GPRS) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
324 if ( (l1a_l1s_com.nsync.eotd_meas_session == FALSE) || |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
325 (l1a_l1s_com.mode == DEDIC_MODE)|| |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
326 (l1a_l1s_com.l1s_en_task[PDTCH] == TASK_ENABLED)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
327 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
328 if ( (l1a_l1s_com.nsync.eotd_meas_session == FALSE) || |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
329 (l1a_l1s_com.mode == DEDIC_MODE)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
330 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
331 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
332 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
333 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
334 //######################## For DSP Rom ################################# |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
335 l1s_dsp_com.dsp_db_w_ptr->d_afc = afc; // Write new afc command. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
336 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3) || (RF_FAM == 61)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
337 // NOTE: In Locosto AFC loading is w.r.t DRP not in ABB |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
338 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_abb |= (1 << B_AFC); // Validate new afc value. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
339 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
340 #if (L1_EOTD==1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
341 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
342 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
343 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
344 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
345 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
346 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
347 /* l1ddsp_load_txpwr() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
348 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
349 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
350 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
351 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
352 /*Notes: |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
353 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
354 While Programming APC Ramp always Program the APCDEL also |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
355 Cal+: |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
356 APCDEL1: LSB Dwn(9:5):Up(4:0) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
357 APCDEL2: MSB Dwn(9:5):Up(4:0) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
358 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
359 Locosto: |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
360 APCDEL1: LSB Dwn(9:5):Up(4:0) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
361 APCDEL2: MSB Dwn(9:5):Up(4:0) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
362 ----- |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
363 Cal+ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
364 APCRAM : Dwn(51:11)Up(10:6)Forced(0) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
365 Locosto: |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
366 APCRAM: Dwn(9:5)Up(4:0) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
367 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
368 For AFC, APCDEL1, APCDEL2, APCRAMP the Control word d_ctl_abb is checked |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
369 i f they are reqd to be updated. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
370 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
371 For AUXAPC (Cal+), the last bit = 1 would mean the DSP would pick it at Tx |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
372 For APCLEV (Loc), it is picked at every Tx, for dummy burst DSP would make it 0 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
373 */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
374 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
375 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
376 void l1ddsp_load_txpwr(UWORD8 txpwr, UWORD16 radio_freq) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
377 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
378 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3) || (RF_FAM == 61)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
379 UWORD16 pwr_data; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
380 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
381 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
382 //config |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
383 if (l1_config.tx_pwr_code ==0) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
384 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
385 // Fixed TXPWR. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
386 l1s_dsp_com.dsp_db_w_ptr->d_power_ctl = l1_config.params.fixed_txpwr; // GSM management disabled: Fixed TXPWR used. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
387 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
388 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
389 #if(RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
390 //Locosto has new API for Ramp |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
391 #if (DSP == 38) || (DSP == 39) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
392 Cust_get_ramp_tab(l1s_dsp_com.dsp_ndb_ptr->a_drp_ramp, txpwr, txpwr, radio_freq); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
393 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
394 #else |
95
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
395 #if (CODE_VERSION != SIMULATION) |
94
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
396 /*** Reference to real ramp array (GSM: 15 power levels, 5-19, DCS: 16 power levels, 0-15) ***/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
397 Cust_get_ramp_tab(l1s_dsp_com.dsp_ndb_ptr->a_ramp, txpwr, txpwr, radio_freq); |
95
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
398 #endif |
94
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
399 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
400 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
401 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
402 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_abb |= ( (1 << B_RAMP) | (1 << B_BULRAMPDEL) | (1 << B_BULRAMPDEL2)); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
403 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
404 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
405 #if(RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
406 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_abb |= ( (1 << B_RAMP) | (1 << B_BULRAMPDEL) | (1 << B_BULRAMPDEL2)); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
407 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
408 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
409 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
410 else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
411 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
412 static UWORD8 last_used_freq_band = 0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
413 UWORD8 freq_band; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
414 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
415 #if (L1_FF_MULTIBAND == 0) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
416 // Check whether band has changed |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
417 // This will be used to reload ramps |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
418 if ((l1_config.std.id == DUAL) || |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
419 (l1_config.std.id == DUALEXT) || |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
420 (l1_config.std.id == DUAL_US)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
421 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
422 if (radio_freq < l1_config.std.first_radio_freq_band2) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
423 freq_band = BAND1; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
424 else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
425 freq_band = BAND2; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
426 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
427 else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
428 freq_band = BAND1; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
429 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
430 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
431 freq_band = l1_multiband_radio_freq_convert_into_effective_band_id(radio_freq); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
432 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
433 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
434 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
435 // Note: txpwr = NO_TXPWR is reserved for forcing the transmitter off |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
436 // ----- (to suppress SACCH during handover, for example) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
437 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
438 /*** Check to see if the TXPWR is to be suppressed (txpwr = NO_TXPWR) ***/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
439 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
440 if(txpwr == NO_TXPWR) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
441 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
442 /*** No transmit ***/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
443 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
444 l1s_dsp_com.dsp_db_w_ptr->d_power_ctl = 0x12; // AUXAPC initialization addr 9 pg 0 Omega |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
445 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_abb |= ( (1 << B_RAMP) | (1 << B_BULRAMPDEL) | (1 << B_BULRAMPDEL2)); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
446 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
447 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
448 #if(RF_FAM == 61 ) //Locosto without Syren Format |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
449 l1s_dsp_com.dsp_db_w_ptr->d_power_ctl = (API) 0; // APCLEV |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
450 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_abb |= ( (1 << B_RAMP) | (1 << B_BULRAMPDEL) | (1 << B_BULRAMPDEL2)); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
451 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
452 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
453 l1s.last_used_txpwr = NO_TXPWR; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
454 return; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
455 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
456 else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
457 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
458 /*** Get power data according to clipped TXPWR ***/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
459 pwr_data = Cust_get_pwr_data(txpwr, radio_freq |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
460 #if(REL99 && FF_PRF) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
461 ,1 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
462 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
463 ); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
464 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
465 /*** Load power control level adding the APC address register ***/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
466 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
467 l1s_dsp_com.dsp_db_w_ptr->d_power_ctl = ((pwr_data << 6) | 0x12); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
468 // AUXAPC initialization addr 9 pg 0 Omega |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
469 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
470 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
471 #if(RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
472 l1s_dsp_com.dsp_db_w_ptr->d_power_ctl = (API)(pwr_data); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
473 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
474 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
475 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
476 #if TESTMODE |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
477 #if(RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
478 // Currently for RF_FAM=61 Enabling APC-Ramp, APCDEL1 and APCDEL2 writing always i.e. in every TDMA frame |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
479 // TODO: Check whether this is okay |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
480 if ((l1_config.TestMode) && (l1_config.tmode.rf_params.down_up & TMODE_UPLINK)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
481 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
482 if ((l1_config.TestMode) && (l1_config.tmode.rf_params.down_up & TMODE_UPLINK) && |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
483 ((l1s.last_used_txpwr != txpwr) || (l1_config.tmode.rf_params.reload_ramps_flag))) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
484 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
485 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
486 #if(RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
487 #if (DSP == 38) || (DSP == 39) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
488 Cust_get_ramp_tab(l1s_dsp_com.dsp_ndb_ptr->a_drp_ramp, txpwr, txpwr, radio_freq); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
489 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
490 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
491 #if (CODE_VERSION != SIMULATION) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
492 Cust_get_ramp_tab(l1s_dsp_com.dsp_ndb_ptr->a_ramp, txpwr, txpwr, radio_freq); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
493 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
494 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
495 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
496 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
497 // Setting bit 3 of this register causes DSP to write to APCDEL1 register in Omega. However, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
498 // we are controlling this register from MCU through the SPI. Therefore, set it to 0. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
499 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_abb |= ( (1 << B_RAMP) | (0 << B_BULRAMPDEL) | (1 << B_BULRAMPDEL2)); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
500 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
501 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
502 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
503 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_abb |= ( (1 << B_RAMP) | (1 << B_BULRAMPDEL) | (1 << B_BULRAMPDEL2)); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
504 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
505 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
506 l1s.last_used_txpwr = txpwr; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
507 l1_config.tmode.rf_params.reload_ramps_flag = 0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
508 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
509 else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
510 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
511 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
512 if ((l1s.last_used_txpwr != txpwr) || (last_used_freq_band != freq_band)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
513 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
514 /*** Power level or band has changed, so update the ramp, and trigger the data send to ABB ***/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
515 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
516 l1s.last_used_txpwr = txpwr; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
517 last_used_freq_band = freq_band; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
518 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
519 /*** Reference to real ramp array (GSM: 15 power levels, 5-19, DCS: 16 power levels, 0-15) ***/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
520 #if(RF_FAM == 61) |
95
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
521 #if (DSP == 38) || (DSP == 39) |
94
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
522 Cust_get_ramp_tab(l1s_dsp_com.dsp_ndb_ptr->a_drp_ramp, txpwr, txpwr, radio_freq); |
95
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
523 #endif |
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
524 #else |
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
525 #if (CODE_VERSION != SIMULATION) |
94
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
526 Cust_get_ramp_tab(l1s_dsp_com.dsp_ndb_ptr->a_ramp, txpwr, txpwr, radio_freq); |
95
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
527 #endif |
94
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
528 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
529 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
530 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3) ||(RF_FAM == 61)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
531 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_abb |= ( (1 << B_RAMP) | (1 << B_BULRAMPDEL) | (1 << B_BULRAMPDEL2)); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
532 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
533 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
534 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
535 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
536 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
537 #if (FF_L1_FAST_DECODING == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
538 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
539 /* l1ddsp_load_fp_task() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
540 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
541 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
542 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
543 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
544 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
545 void l1ddsp_load_fast_dec_task(API task, UWORD8 burst_id) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
546 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
547 if (l1s_check_fast_decoding_authorized(task)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
548 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
549 //l1s_dsp_com.dsp_db_w_ptr->d_fast_paging_ctrl = 0x0001 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
550 l1s_dsp_com.dsp_db_common_w_ptr->d_fast_paging_ctrl = 0x00001; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
551 if(burst_id == BURST_1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
552 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
553 l1s_dsp_com.dsp_db_common_w_ptr->d_fast_paging_ctrl |= 0x8000; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
554 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
555 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
556 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
557 #endif /* FF_L1_FAST_DECODING */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
558 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
559 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
560 /* l1ddsp_load_rx_task() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
561 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
562 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
563 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
564 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
565 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
566 void l1ddsp_load_rx_task(API rx_task, UWORD8 burst_id, UWORD8 tsq) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
567 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
568 l1s_dsp_com.dsp_db_w_ptr->d_task_d = rx_task; // Write RX task Identifier. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
569 l1s_dsp_com.dsp_db_w_ptr->d_burst_d = burst_id; // Write RX burst Identifier. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
570 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_system |= tsq << B_TSQ; // Write end of task DSP state. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
571 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
572 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
573 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
574 /* l1ddsp_load_tx_task() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
575 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
576 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
577 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
578 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
579 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
580 void l1ddsp_load_tx_task(API tx_task, UWORD8 burst_id, UWORD8 tsq) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
581 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
582 l1s_dsp_com.dsp_db_w_ptr->d_task_u = tx_task; // write TX task Identifier. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
583 l1s_dsp_com.dsp_db_w_ptr->d_burst_u = burst_id; // write TX burst Identifier. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
584 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_system |= tsq << B_TSQ; // Write end of task DSP state. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
585 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
586 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
587 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
588 /* l1ddsp_load_ra_task() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
589 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
590 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
591 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
592 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
593 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
594 void l1ddsp_load_ra_task(API ra_task) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
595 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
596 l1s_dsp_com.dsp_db_w_ptr->d_task_ra = ra_task; // write RA task Identifier. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
597 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
598 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
599 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
600 /* l1ddsp_load_tch_mode() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
601 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
602 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
603 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
604 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
605 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
606 void l1ddsp_load_tch_mode(UWORD8 dai_mode, BOOL dtx_allowed) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
607 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
608 // TCH mode register. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
609 // bit[0] -> b_eotd. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
610 // bit[1] -> b_audio_async only for WCP |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
611 // bit [2] -> b_dtx. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
612 // bit[3] -> play_ul when set to 1 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
613 // bit[4] -> play_dl when set to 1 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
614 // bit[5] -> DTX selection for voice memo |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
615 // bit[6] -> Reserved for ciphering debug |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
616 // bit[7..10] -> Reserved for ramp up control |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
617 // bit[11] -> Reserved for analog device selection |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
618 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
619 #if (DSP == 32) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
620 UWORD16 mask = 0xfffb; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
621 #else // NO OP_WCP |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
622 UWORD16 mask = 0xfff8; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
623 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
624 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
625 l1s_dsp_com.dsp_ndb_ptr->d_tch_mode = (l1s_dsp_com.dsp_ndb_ptr->d_tch_mode & mask) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
626 | (dtx_allowed<<2); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
627 #if (L1_EOTD == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
628 l1s_dsp_com.dsp_ndb_ptr->d_tch_mode |= B_EOTD; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
629 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
630 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
631 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
632 #if (AMR == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
633 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
634 /* l1ddsp_load_tch_param() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
635 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
636 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
637 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
638 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
639 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
640 #if (FF_L1_TCH_VOCODER_CONTROL == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
641 void l1ddsp_load_tch_param(T_TIME_INFO *next_time, UWORD8 chan_mode, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
642 UWORD8 chan_type, UWORD8 subchannel, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
643 UWORD8 tch_loop, UWORD8 sync_tch, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
644 UWORD8 sync_amr, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
645 UWORD8 reset_sacch, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
646 #if !FF_L1_IT_DSP_DTX |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
647 UWORD8 vocoder_on) |
95
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
648 #else |
94
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
649 UWORD8 vocoder_on, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
650 BOOL dtx_dsp_interrupt) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
651 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
652 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
653 void l1ddsp_load_tch_param(T_TIME_INFO *next_time, UWORD8 chan_mode, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
654 UWORD8 chan_type, UWORD8 subchannel, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
655 UWORD8 tch_loop, UWORD8 sync_tch, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
656 #if !FF_L1_IT_DSP_DTX |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
657 UWORD8 sync_amr) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
658 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
659 UWORD8 sync_amr, BOOL dtx_dsp_interrupt) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
660 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
661 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
662 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
663 UWORD32 count_0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
664 UWORD32 count_1; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
665 UWORD32 d_ctrl_tch; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
666 UWORD32 d_fn; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
667 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
668 // d_ctrl_tch |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
669 // ---------- |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
670 // bit [0..3] -> b_chan_mode |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
671 // bit [4..7] -> b_chan_type |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
672 // bit [8] -> b_sync_tch_ul |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
673 // bit [9] -> b_sync_amr |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
674 // bit [10] -> b_stop_tch_ul |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
675 // bit [11] -> b_stop_tch_dl |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
676 // bit [12..14] -> b_tch_loop |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
677 // bit [15] -> b_subchannel |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
678 #if (FF_L1_TCH_VOCODER_CONTROL == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
679 d_ctrl_tch = (chan_mode<<B_CHAN_MODE) | (chan_type<<B_CHAN_TYPE) | (subchannel<<B_SUBCHANNEL) | |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
680 (sync_tch<<B_SYNC_TCH_UL) | (sync_amr<<B_SYNC_AMR) | |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
681 (tch_loop<<B_TCH_LOOP) | (reset_sacch<<B_RESET_SACCH) | (vocoder_on<<B_VOCODER_ON); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
682 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
683 d_ctrl_tch = (chan_mode<<B_CHAN_MODE) | (chan_type<<B_CHAN_TYPE) | (subchannel<<B_SUBCHANNEL) | |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
684 (sync_tch<<B_SYNC_TCH_UL) | (sync_amr<<B_SYNC_AMR) | |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
685 (tch_loop<<B_TCH_LOOP); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
686 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
687 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
688 // d_fn |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
689 // ---- |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
690 // bit [0..7] -> b_fn_report |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
691 // bit [8..15] -> b_fn_sid |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
692 d_fn = (next_time->fn_in_report) | ((next_time->fn%104)<<8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
693 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
694 // a_a5fn |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
695 // ------ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
696 // count_0 (a_a5fn[0]), bit [0..4] -> T2. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
697 // count_0 (a_a5fn[1]), bit [5..10] -> T3. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
698 // count_1 (a_a5fn[0]), bit [0..10] -> T1. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
699 count_0 = ((UWORD16)next_time->t3 << 5) | (next_time->t2); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
700 count_1 = (next_time->t1); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
701 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
702 l1s_dsp_com.dsp_db_w_ptr->d_fn = d_fn; // write both Fn_sid, Fn_report. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
703 l1s_dsp_com.dsp_db_w_ptr->a_a5fn[0] = count_0; // cyphering FN part 1. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
704 l1s_dsp_com.dsp_db_w_ptr->a_a5fn[1] = count_1; // cyphering FN part 2. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
705 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_tch = d_ctrl_tch; // Channel config. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
706 #if FF_L1_IT_DSP_DTX |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
707 // ### TBD: report this block below in the other instance of this function |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
708 // DTX interrupt request is latched by DSP in TDMA3 (TCH-AFS, TCH-AHS0) or TDMA0 (TCH-AHS1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
709 if ((chan_mode == TCH_AFS_MODE) || (chan_mode == TCH_AHS_MODE)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
710 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
711 if (((next_time->fn_mod13_mod4 == 3) && |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
712 ((chan_mode == TCH_AFS_MODE) || ((subchannel == 0)))) || |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
713 ((next_time->fn_mod13_mod4 == 0) && |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
714 ((chan_mode == TCH_AHS_MODE) && (subchannel == 1))) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
715 ) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
716 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
717 if (dtx_dsp_interrupt) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
718 l1s_dsp_com.dsp_ndb_ptr->d_fast_dtx_enable=1; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
719 else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
720 l1s_dsp_com.dsp_ndb_ptr->d_fast_dtx_enable=0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
721 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
722 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
723 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
724 // Fast DTX not supported |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
725 else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
726 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
727 // No interrupt genaration |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
728 l1s_dsp_com.dsp_ndb_ptr->d_fast_dtx_enable=0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
729 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
730 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
731 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
732 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
733 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
734 /* l1ddsp_load_tch_param() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
735 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
736 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
737 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
738 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
739 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
740 #if (FF_L1_TCH_VOCODER_CONTROL == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
741 void l1ddsp_load_tch_param(T_TIME_INFO *next_time, UWORD8 chan_mode, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
742 UWORD8 chan_type, UWORD8 subchannel, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
743 UWORD8 tch_loop, UWORD8 sync_tch, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
744 #if !FF_L1_IT_DSP_DTX |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
745 UWORD8 reset_sacch, UWORD8 vocoder_on) |
95
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
746 #else |
94
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
747 UWORD8 reset_sacch, UWORD8 vocoder_on, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
748 BOOL dtx_dsp_interrupt) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
749 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
750 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
751 void l1ddsp_load_tch_param(T_TIME_INFO *next_time, UWORD8 chan_mode, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
752 UWORD8 chan_type, UWORD8 subchannel, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
753 #if !FF_L1_IT_DSP_DTX |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
754 UWORD8 tch_loop, UWORD8 sync_tch) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
755 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
756 UWORD8 tch_loop, UWORD8 sync_tch, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
757 BOOL dtx_dsp_interrupt) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
758 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
759 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
760 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
761 UWORD32 count_0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
762 UWORD32 count_1; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
763 UWORD32 d_ctrl_tch; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
764 UWORD32 d_fn; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
765 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
766 // d_ctrl_tch |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
767 // ---------- |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
768 // bit [0..3] -> b_chan_mode |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
769 // bit [4..7] -> b_chan_type |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
770 // bit [8] -> b_sync_tch_ul |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
771 // bit [9] -> b_sync_tch_dl |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
772 // bit [10] -> b_stop_tch_ul |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
773 // bit [11] -> b_stop_tch_dl |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
774 // bit [12..14] -> b_tch_loop |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
775 // bit [15] -> b_subchannel |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
776 #if (FF_L1_TCH_VOCODER_CONTROL == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
777 d_ctrl_tch = (chan_mode<<B_CHAN_MODE) | (chan_type<<B_CHAN_TYPE) | (subchannel<<B_SUBCHANNEL) | |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
778 (sync_tch<<B_SYNC_TCH_UL) | (sync_tch<<B_SYNC_TCH_DL) | |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
779 (tch_loop<<B_TCH_LOOP) | (reset_sacch<<B_RESET_SACCH) | (vocoder_on<<B_VOCODER_ON); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
780 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
781 d_ctrl_tch = (chan_mode<<B_CHAN_MODE) | (chan_type<<B_CHAN_TYPE) | (subchannel<<B_SUBCHANNEL) | |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
782 (sync_tch<<B_SYNC_TCH_UL) | (sync_tch<<B_SYNC_TCH_DL) | |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
783 (tch_loop<<B_TCH_LOOP); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
784 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
785 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
786 // d_fn |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
787 // ---- |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
788 // bit [0..7] -> b_fn_report |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
789 // bit [8..15] -> b_fn_sid |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
790 d_fn = (next_time->fn_in_report) | ((next_time->fn%104)<<8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
791 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
792 // a_a5fn |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
793 // ------ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
794 // count_0 (a_a5fn[0]), bit [0..4] -> T2. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
795 // count_0 (a_a5fn[1]), bit [5..10] -> T3. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
796 // count_1 (a_a5fn[0]), bit [0..10] -> T1. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
797 count_0 = ((UWORD16)next_time->t3 << 5) | (next_time->t2); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
798 count_1 = (next_time->t1); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
799 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
800 l1s_dsp_com.dsp_db_w_ptr->d_fn = d_fn; // write both Fn_sid, Fn_report. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
801 l1s_dsp_com.dsp_db_w_ptr->a_a5fn[0] = count_0; // cyphering FN part 1. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
802 l1s_dsp_com.dsp_db_w_ptr->a_a5fn[1] = count_1; // cyphering FN part 2. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
803 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_tch = d_ctrl_tch; // Channel config. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
804 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
805 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
806 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
807 #if (L1_VOCODER_IF_CHANGE == 0) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
808 // TODO: to be moved in API file (see BUG3093) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
809 BOOL enable_tch_vocoder(BOOL vocoder) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
810 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
811 #if (FF_L1_TCH_VOCODER_CONTROL == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
812 // To enable the vocoder, we set the trigger => then handled in l1s_dedicated_mode_manager |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
813 #if (W_A_DSP_PR20037 == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
814 if ((vocoder==TRUE) && (l1a_l1s_com.dedic_set.start_vocoder == TCH_VOCODER_DISABLED)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
815 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
816 l1a_l1s_com.dedic_set.start_vocoder = TCH_VOCODER_ENABLE_REQ; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
817 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
818 #if ( W_A_WAIT_DSP_RESTART_AFTER_VOCODER_ENABLE ==1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
819 NU_Sleep(DSP_VOCODER_ON_TRANSITION); // DSP transition |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
820 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
821 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
822 // When vocoder_on = FALSE, vocoder module is not executed |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
823 else if ((vocoder==FALSE) && (l1a_l1s_com.dedic_set.start_vocoder == TCH_VOCODER_ENABLED)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
824 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
825 l1a_l1s_com.dedic_set.start_vocoder = TCH_VOCODER_DISABLE_REQ; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
826 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
827 #else // W_A_DSP_PR20037 == 0 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
828 if (vocoder) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
829 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
830 l1a_l1s_com.dedic_set.start_vocoder = TRUE; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
831 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
832 // When vocoder_on = FALSE, vocoder module is not executed |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
833 else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
834 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
835 l1a_l1s_com.dedic_set.vocoder_on = FALSE; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
836 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
837 #endif // W_A_DSP_PR20037 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
838 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
839 return TRUE; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
840 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
841 return FALSE; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
842 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
843 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
844 #endif // L1_VOCODER_IF_CHANGE |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
845 BOOL l1_select_mcsi_port(UWORD8 port) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
846 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
847 #if ( (CHIPSET == 12) && (RF_FAM != 61) ) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
848 l1s_dsp_com.dsp_ndb_ptr->d_mcsi_select = (API)port; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
849 return TRUE; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
850 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
851 return FALSE; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
852 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
853 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
854 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
855 // TODO: to be moved in API file |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
856 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
857 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
858 /* l1ddsp_load_ciph_param() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
859 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
860 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
861 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
862 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
863 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
864 void l1ddsp_load_ciph_param(UWORD8 a5mode, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
865 T_ENCRYPTION_KEY *ciph_key) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
866 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
867 // Store ciphering mode (0 for no ciphering) in MCU-DSP com. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
868 l1s_dsp_com.dsp_ndb_ptr->d_a5mode = a5mode; // A5 algorithm (0 for none). |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
869 // Store ciphering key. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
870 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
871 #if (L1_A5_3 == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
872 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
873 if(a5mode == 3) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
874 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
875 #if(OP_L1_STANDALONE != 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
876 l1s_dsp_com.dsp_ndb_ptr->a_a5_kc[0] = (ciph_key->A[0]) | (ciph_key->A[1] << 8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
877 l1s_dsp_com.dsp_ndb_ptr->a_a5_kc[1] = (ciph_key->A[2]) | (ciph_key->A[3] << 8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
878 l1s_dsp_com.dsp_ndb_ptr->a_a5_kc[2] = (ciph_key->A[4]) | (ciph_key->A[5] << 8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
879 l1s_dsp_com.dsp_ndb_ptr->a_a5_kc[3] = (ciph_key->A[6]) | (ciph_key->A[7] << 8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
880 l1s_dsp_com.dsp_ndb_ptr->a_a5_kc[4] = (ciph_key->A[8]) | (ciph_key->A[9] << 8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
881 l1s_dsp_com.dsp_ndb_ptr->a_a5_kc[5] = (ciph_key->A[10]) | (ciph_key->A[11] << 8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
882 l1s_dsp_com.dsp_ndb_ptr->a_a5_kc[6] = (ciph_key->A[12]) | (ciph_key->A[13] << 8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
883 l1s_dsp_com.dsp_ndb_ptr->a_a5_kc[7] = (ciph_key->A[14]) | (ciph_key->A[15] << 8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
884 #else // (OP_L1_STANDALONE == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
885 l1s_dsp_com.dsp_ndb_ptr->a_a5_kc[0] = (ciph_key->A[0]) | (ciph_key->A[1] << 8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
886 l1s_dsp_com.dsp_ndb_ptr->a_a5_kc[1] = (ciph_key->A[2]) | (ciph_key->A[3] << 8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
887 l1s_dsp_com.dsp_ndb_ptr->a_a5_kc[2] = (ciph_key->A[4]) | (ciph_key->A[5] << 8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
888 l1s_dsp_com.dsp_ndb_ptr->a_a5_kc[3] = (ciph_key->A[6]) | (ciph_key->A[7] << 8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
889 l1s_dsp_com.dsp_ndb_ptr->a_a5_kc[4] = (ciph_key->A[8]) | (ciph_key->A[1] << 8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
890 l1s_dsp_com.dsp_ndb_ptr->a_a5_kc[5] = (ciph_key->A[10]) | (ciph_key->A[3] << 8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
891 l1s_dsp_com.dsp_ndb_ptr->a_a5_kc[6] = (ciph_key->A[12]) | (ciph_key->A[5] << 8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
892 l1s_dsp_com.dsp_ndb_ptr->a_a5_kc[7] = (ciph_key->A[14]) | (ciph_key->A[7] << 8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
893 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
894 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
895 else // a5mode == 1 or 2 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
896 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
897 l1s_dsp_com.dsp_ndb_ptr->a_a5_kc[0] = (ciph_key->A[0]) | (ciph_key->A[1] << 8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
898 l1s_dsp_com.dsp_ndb_ptr->a_a5_kc[1] = (ciph_key->A[2]) | (ciph_key->A[3] << 8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
899 l1s_dsp_com.dsp_ndb_ptr->a_a5_kc[2] = (ciph_key->A[4]) | (ciph_key->A[5] << 8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
900 l1s_dsp_com.dsp_ndb_ptr->a_a5_kc[3] = (ciph_key->A[6]) | (ciph_key->A[7] << 8); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
901 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
902 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
903 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
904 |
95
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
905 l1s_dsp_com.dsp_ndb_ptr->a_kc[0] = (ciph_key->A[0]) | (ciph_key->A[1] << 8); |
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
906 l1s_dsp_com.dsp_ndb_ptr->a_kc[1] = (ciph_key->A[2]) | (ciph_key->A[3] << 8); |
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
907 l1s_dsp_com.dsp_ndb_ptr->a_kc[2] = (ciph_key->A[4]) | (ciph_key->A[5] << 8); |
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
908 l1s_dsp_com.dsp_ndb_ptr->a_kc[3] = (ciph_key->A[6]) | (ciph_key->A[7] << 8); |
94
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
909 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
910 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
911 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
912 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
913 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
914 /* l1ddsp_stop_tch() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
915 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
916 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
917 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
918 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
919 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
920 void l1ddsp_stop_tch(void) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
921 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
922 // Tch channel description. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
923 // bit [10] -> b_stop_tch_ul, stop TCH/UL. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
924 // bit [11] -> b_stop_tch_dl, stop TCH/DL. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
925 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
926 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_tch |= 3 << B_STOP_TCH_UL; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
927 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
928 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
929 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
930 /* l1ddsp_meas_read() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
931 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
932 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
933 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
934 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
935 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
936 void l1ddsp_meas_read(UWORD8 nbmeas, UWORD16 *pm) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
937 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
938 UWORD8 i; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
939 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
940 for (i= 0; i < nbmeas; i++) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
941 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
942 pm[i] = ((l1s_dsp_com.dsp_db_r_ptr->a_pm[i] & 0xffff)); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
943 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
944 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
945 #if TESTMODE |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
946 if(l1_config.TestMode) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
947 l1tm.tmode_stats.pm_recent = l1s_dsp_com.dsp_db_r_ptr->a_pm[0] & 0xffff; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
948 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
949 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
950 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
951 #if (AMR == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
952 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
953 /* l1ddsp_load_amr_param() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
954 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
955 /* Parameters : AMR configuration */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
956 /* Return : none */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
957 /* Functionality : Download the AMR configuration to the */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
958 /* DSP via API */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
959 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
960 void l1ddsp_load_amr_param(T_AMR_CONFIGURATION amr_param, UWORD8 cmip) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
961 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
962 // Clear the AMR API buffer |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
963 l1s_dsp_com.dsp_ndb_ptr->a_amr_config[0] = (API)0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
964 l1s_dsp_com.dsp_ndb_ptr->a_amr_config[1] = (API)0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
965 l1s_dsp_com.dsp_ndb_ptr->a_amr_config[2] = (API)0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
966 l1s_dsp_com.dsp_ndb_ptr->a_amr_config[3] = (API)0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
967 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
968 // Set the AMR parameters |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
969 l1s_dsp_com.dsp_ndb_ptr->a_amr_config[NSCB_INDEX] |= (API)((amr_param.noise_suppression_bit & NSCB_MASK ) << NSCB_SHIFT); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
970 l1s_dsp_com.dsp_ndb_ptr->a_amr_config[ICMUL_INDEX] |= (API)((amr_param.initial_codec_mode & ICM_MASK ) << ICMUL_SHIFT); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
971 l1s_dsp_com.dsp_ndb_ptr->a_amr_config[ICMDL_INDEX] |= (API)((amr_param.initial_codec_mode & ICM_MASK ) << ICMDL_SHIFT); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
972 l1s_dsp_com.dsp_ndb_ptr->a_amr_config[ICMIUL_INDEX] |= (API)((amr_param.initial_codec_mode_indicator & ICMI_MASK ) << ICMIUL_SHIFT); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
973 l1s_dsp_com.dsp_ndb_ptr->a_amr_config[ICMIDL_INDEX] |= (API)((amr_param.initial_codec_mode_indicator & ICMI_MASK ) << ICMIDL_SHIFT); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
974 l1s_dsp_com.dsp_ndb_ptr->a_amr_config[ACSUL_INDEX] |= (API)((amr_param.active_codec_set & ACS_MASK ) << ACSUL_SHIFT); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
975 l1s_dsp_com.dsp_ndb_ptr->a_amr_config[ACSDL_INDEX] |= (API)((amr_param.active_codec_set & ACS_MASK ) << ACSDL_SHIFT); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
976 l1s_dsp_com.dsp_ndb_ptr->a_amr_config[THR1_INDEX] |= (API)((amr_param.threshold[0] & THR_MASK ) << THR1_SHIFT); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
977 l1s_dsp_com.dsp_ndb_ptr->a_amr_config[THR2_INDEX] |= (API)((amr_param.threshold[1] & THR_MASK ) << THR2_SHIFT); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
978 l1s_dsp_com.dsp_ndb_ptr->a_amr_config[THR3_INDEX] |= (API)((amr_param.threshold[2] & THR_MASK ) << THR3_SHIFT); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
979 l1s_dsp_com.dsp_ndb_ptr->a_amr_config[HYST1_INDEX] |= (API)((amr_param.hysteresis[0] & HYST_MASK ) << HYST1_SHIFT); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
980 l1s_dsp_com.dsp_ndb_ptr->a_amr_config[HYST2_INDEX] |= (API)((amr_param.hysteresis[1] & HYST_MASK ) << HYST2_SHIFT); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
981 l1s_dsp_com.dsp_ndb_ptr->a_amr_config[HYST3_INDEX] |= (API)((amr_param.hysteresis[2] & HYST_MASK ) << HYST3_SHIFT); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
982 l1s_dsp_com.dsp_ndb_ptr->a_amr_config[CMIP_INDEX] |= (API)((cmip & CMIP_MASK ) << CMIP_SHIFT); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
983 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
984 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
985 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
986 #if (L1_SAIC != 0) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
987 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
988 /* l1ddsp_load_swh_flag() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
989 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
990 /* Parameters : SWH (Spatial Whitening) Flag */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
991 /* Return : none */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
992 /* Functionality : To write the d_swh_ApplyWhitening flag*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
993 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
994 void l1ddsp_load_swh_flag (UWORD16 SWH_flag, UWORD16 SAIC_flag) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
995 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
996 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
997 if(SAIC_flag) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
998 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
999 l1s_dsp_com.dsp_db_common_w_ptr->d_swh_ctrl_db = SAIC_ENABLE_DB; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1000 if(SWH_flag) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1001 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1002 l1s_dsp_com.dsp_db_common_w_ptr->d_swh_ctrl_db |= (0x01<< B_SWH_DB); |
95
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
1003 } |
94
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1004 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1005 else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1006 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1007 l1s_dsp_com.dsp_db_common_w_ptr->d_swh_ctrl_db = 0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1008 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1009 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1010 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1011 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1012 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1013 /* l1ddsp_end_scenario() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1014 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1015 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1016 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1017 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1018 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1019 void l1ddsp_end_scenario(UWORD8 type) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1020 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1021 #if (CODE_VERSION == SIMULATION) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1022 #if (AUDIO_SIMULATION) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1023 switch(type) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1024 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1025 case GSM_CTL: |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1026 case GSM_MISC_CTL: |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1027 // a DSP control for a GSM task or |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1028 // a DSP control for a GSM and a MISC tasks |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1029 //----------------------------- |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1030 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1031 // set DSP_ENB and DSP_PAG for communication interrupt |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1032 l1s_tpu_com.reg_cmd->dsp_pag_bit = l1s_dsp_com.dsp_w_page; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1033 l1s_tpu_com.reg_cmd->dsp_enb_bit = ON; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1034 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1035 // change DSP page pointer for next controle |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1036 l1s_dsp_com.dsp_w_page ^= 1; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1037 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1038 break; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1039 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1040 case MISC_CTL: |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1041 // a DSP control for a MISC task |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1042 //------------------------------ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1043 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1044 // set only MISC task and reset MISC page |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1045 // (don't change GSM PAGE). |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1046 // set DSP communication Interrupt. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1047 // set DSP_ENB and the same DSP_PAG for communication interrupt |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1048 l1s_tpu_com.reg_cmd->dsp_pag_bit = l1s_dsp_com.dsp_w_page^1; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1049 l1s_tpu_com.reg_cmd->dsp_enb_bit = ON; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1050 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1051 break; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1052 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1053 #else // NO AUDIO_SIMULATION |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1054 // set DSP_ENB and DSP_PAG for communication interrupt |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1055 l1s_tpu_com.reg_cmd->dsp_pag_bit = l1s_dsp_com.dsp_w_page; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1056 l1s_tpu_com.reg_cmd->dsp_enb_bit = ON; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1057 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1058 // change DSP page pointer for next control |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1059 l1s_dsp_com.dsp_w_page ^= 1; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1060 #endif // AUDIO_SIMULATION |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1061 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1062 #else // NOT_SIMULATION |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1063 UWORD32 dsp_task=0 ;//omaps00090550; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1064 switch(type) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1065 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1066 case GSM_CTL: |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1067 // a DSP control for a GSM task |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1068 //----------------------------- |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1069 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1070 // set only GSM task and GSM page |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1071 dsp_task = B_GSM_TASK | l1s_dsp_com.dsp_w_page; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1072 // change DSP page pointer for next controle |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1073 l1s_dsp_com.dsp_w_page ^= 1; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1074 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1075 break; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1076 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1077 case MISC_CTL: |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1078 // a DSP control for a MISC task |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1079 //------------------------------ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1080 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1081 UWORD32 previous_page = l1s_dsp_com.dsp_w_page ^ 1; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1082 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1083 // set only MISC task and reset MISC page |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1084 // (don't change GSM PAGE). |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1085 // set DSP communication Interrupt. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1086 dsp_task = B_MISC_TASK | previous_page; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1087 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1088 // Rem: DSP makes the DB header feedback even in case |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1089 // of MISC task (like TONES). This created some |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1090 // side effect which are "work-around" passing |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1091 // the correct DB page to the DSP. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1092 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1093 break; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1094 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1095 case GSM_MISC_CTL: |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1096 // a DSP control for a GSM and a MISC tasks |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1097 //----------------------------------------- |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1098 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1099 // set GSM task, MISC task and GSM page bit..... |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1100 dsp_task = B_GSM_TASK | B_MISC_TASK | l1s_dsp_com.dsp_w_page; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1101 // change DSP page pointer for next controle |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1102 l1s_dsp_com.dsp_w_page ^= 1; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1103 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1104 break; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1105 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1106 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1107 // write dsp tasks..... |
95
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
1108 #if (DSP >= 33) |
94
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1109 l1s_dsp_com.dsp_ndb_ptr->d_dsp_page = (API) dsp_task; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1110 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1111 l1s_dsp_com.dsp_param_ptr->d_dsp_page = (API) dsp_task; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1112 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1113 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1114 // Enable frame IT on next TDMA |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1115 l1dmacro_set_frame_it(); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1116 |
95
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
1117 #if (DSP >= 38) |
94
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1118 // DSP CPU load measurement - write logic (provide TDMA frame number to DSP) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1119 (*((volatile UWORD16 *)(DSP_CPU_LOAD_MCU_W_TDMA_FN))) = (API)l1s.actual_time.fn_mod42432; |
95
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
1120 #endif |
94
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1121 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1122 #endif // NOT_SIMULATION |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1123 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1124 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1125 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1126 /* l1dtpu_meas() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1127 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1128 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1129 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1130 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1131 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1132 /* Locosto : should take additional Param of task */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1133 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1134 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1135 void l1dtpu_meas(UWORD16 radio_freq, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1136 WORD8 agc, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1137 UWORD8 lna_off, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1138 UWORD16 win_id, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1139 UWORD16 tpu_synchro, UWORD8 adc_active |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1140 #if(RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1141 ,UWORD8 afc_mode |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1142 ,UWORD8 if_ctl |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1143 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1144 ) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1145 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1146 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1147 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1148 WORD16 offset; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1149 WORD16 when; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1150 UWORD16 offset_chg; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1151 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1152 #if TESTMODE |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1153 if (!l1_config.agc_enable) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1154 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1155 // AGC gain can only be controlled in 2dB steps as the bottom bit (bit zero) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1156 // corresponds to the lna_off bit |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1157 agc = l1_config.tmode.rx_params.agc; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1158 lna_off = l1_config.tmode.rx_params.lna_off; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1159 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1160 #endif // TESTMODE |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1161 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1162 // Compute offset |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1163 offset_chg = ((win_id * BP_DURATION) >> BP_SPLIT_PW2); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1164 offset = tpu_synchro + offset_chg; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1165 if(offset >= TPU_CLOCK_RANGE) offset -= TPU_CLOCK_RANGE; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1166 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1167 // Compute offset change timing |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1168 when = offset_chg + PROVISION_TIME - (l1_config.params.rx_synth_setup_time + EPSILON_OFFS); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1169 if(when < 0) when += TPU_CLOCK_RANGE; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1170 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1171 // Program TPU scenario |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1172 l1dmacro_offset (offset, when); // change TPU offset according to win_id |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1173 l1dmacro_rx_synth (radio_freq); // pgme SYNTH. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1174 if(adc_active == ACTIVE) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1175 l1dmacro_adc_read_rx(); // pgme ADC measurement |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1176 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1177 l1dmacro_agc (radio_freq, agc,lna_off |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1178 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1179 ,if_ctl |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1180 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1181 ); // pgme AGC. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1182 #if (CODE_VERSION == SIMULATION) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1183 l1dmacro_rx_ms (radio_freq, 0); // pgm PWR acquisition. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1184 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1185 #if (L1_MADC_ON == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1186 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1187 l1dmacro_rx_ms (radio_freq,adc_active); // pgm PWR acquisition. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1188 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1189 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1190 l1dmacro_rx_ms (radio_freq); // pgm PWR acquisition. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1191 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1192 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1193 l1dmacro_offset (tpu_synchro, IMM); // restore offset |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1194 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1195 //Locosto |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1196 #if(RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1197 // L1_AFC_SCRIPT_MODE - This is specific to Locosto to make AFC script run after |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1198 // the second power measurement during FBNEW |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1199 if ((win_id == 0) || (afc_mode == L1_AFC_SCRIPT_MODE)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1200 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1201 if (win_id == 0) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1202 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1203 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1204 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1205 // NOTE: In Locosto AFC is in DRP not in triton |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1206 l1ddsp_load_afc(l1s.afc); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1207 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1208 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1209 //Locosto |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1210 #if(RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1211 if(afc_mode != L1_AFC_NONE) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1212 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1213 if(afc_mode == L1_AFC_SCRIPT_MODE) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1214 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1215 l1dtpu_load_afc(l1s.afc); //Load the Initial afc value to the TPU. TPU would copy it to the DRP Wrapper Mem. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1216 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1217 else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1218 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1219 l1ddsp_load_afc(l1s.afc); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1220 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1221 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1222 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1223 // end Locosto |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1224 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1225 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1226 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1227 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1228 /* l1dtpu_neig_fb() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1229 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1230 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1231 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1232 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1233 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1234 void l1dtpu_neig_fb(UWORD16 radio_freq, WORD8 agc, UWORD8 lna_off) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1235 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1236 #if TESTMODE |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1237 if (!l1_config.agc_enable) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1238 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1239 // AGC gain can only be controlled in 2dB steps as the bottom bit (bit zero) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1240 // corresponds to the lna_off bit |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1241 agc = l1_config.tmode.rx_params.agc; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1242 lna_off = l1_config.tmode.rx_params.lna_off; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1243 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1244 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1245 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1246 l1dmacro_rx_synth (radio_freq); // pgme SYNTH. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1247 l1dmacro_agc (radio_freq,agc, lna_off |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1248 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1249 ,IF_120KHZ_DSP |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1250 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1251 ); // pgme AGC. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1252 #if (L1_MADC_ON == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1253 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1254 l1dmacro_rx_fb (radio_freq,INACTIVE); // pgm FB acquisition. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1255 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1256 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1257 l1dmacro_rx_fb (radio_freq); // pgm FB acquisition. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1258 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1259 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1260 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1261 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1262 /* l1dtpu_neig_fb26() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1263 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1264 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1265 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1266 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1267 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1268 void l1dtpu_neig_fb26(UWORD16 radio_freq, WORD8 agc, UWORD8 lna_off, UWORD32 offset_serv) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1269 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1270 WORD16 offset; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1271 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1272 #if TESTMODE |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1273 if (!l1_config.agc_enable) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1274 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1275 // AGC gain can only be controlled in 2dB steps as the bottom bit (bit zero) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1276 // corresponds to the lna_off bit |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1277 agc = l1_config.tmode.rx_params.agc; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1278 lna_off = l1_config.tmode.rx_params.lna_off; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1279 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1280 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1281 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1282 // Compute offset |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1283 offset = offset_serv + l1_config.params.fb26_anchoring_time; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1284 if(offset >= TPU_CLOCK_RANGE) offset -= TPU_CLOCK_RANGE; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1285 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1286 // Program TPU scenario |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1287 l1dmacro_offset (offset, l1_config.params.fb26_change_offset_time); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1288 l1dmacro_rx_synth (radio_freq); // pgme SYNTH. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1289 l1dmacro_agc (radio_freq,agc, lna_off |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1290 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1291 ,IF_120KHZ_DSP |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1292 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1293 ); // pgme AGC. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1294 #if (L1_MADC_ON == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1295 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1296 l1dmacro_rx_fb26 (radio_freq, INACTIVE); // pgm FB acquisition. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1297 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1298 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1299 l1dmacro_rx_fb26 (radio_freq); // pgm FB acquisition. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1300 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1301 l1dmacro_offset (offset_serv, IMM); // restore offset |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1302 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1303 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1304 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1305 /* l1dtpu_neig_sb() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1306 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1307 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1308 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1309 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1310 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1311 void l1dtpu_neig_sb(UWORD16 radio_freq, WORD8 agc, UWORD8 lna_off, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1312 UWORD32 time_alignmt, UWORD32 offset_serv, UWORD8 reload_flag, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1313 UWORD8 attempt |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1314 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1315 ,UWORD8 if_ctl |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1316 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1317 ) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1318 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1319 UWORD16 offset_neigh; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1320 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1321 #if TESTMODE |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1322 if (!l1_config.agc_enable) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1323 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1324 // AGC gain can only be controlled in 2dB steps as the bottom bit (bit zero) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1325 // corresponds to the lna_off bit |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1326 agc = l1_config.tmode.rx_params.agc; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1327 lna_off = l1_config.tmode.rx_params.lna_off; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1328 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1329 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1330 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1331 // compute offset neighbour... |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1332 offset_neigh = offset_serv + time_alignmt; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1333 if(offset_neigh >= TPU_CLOCK_RANGE) offset_neigh -= TPU_CLOCK_RANGE; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1334 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1335 // load OFFSET with NEIGHBOUR value. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1336 l1dmacro_offset (offset_neigh, l1_config.params.rx_change_offset_time); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1337 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1338 // Insert 1 NOP to correct the EPSILON_SYNC side effect. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1339 if(attempt != 2) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1340 if(time_alignmt >= (TPU_CLOCK_RANGE - EPSILON_SYNC)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1341 l1dmacro_offset (offset_neigh, 0); // load OFFSET with NEIGHBOUR value. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1342 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1343 l1dmacro_rx_synth(radio_freq); // pgme SYNTH. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1344 l1dmacro_agc (radio_freq, agc, lna_off |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1345 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1346 ,if_ctl |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1347 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1348 ); // pgme AGC. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1349 #if (L1_MADC_ON == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1350 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1351 l1dmacro_rx_sb (radio_freq,INACTIVE); // pgm SB acquisition. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1352 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1353 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1354 l1dmacro_rx_sb (radio_freq); // pgm SB acquisition. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1355 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1356 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1357 // Restore offset with serving value. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1358 if(reload_flag == TRUE) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1359 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1360 l1dmacro_offset (offset_serv, IMM); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1361 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1362 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1363 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1364 /* l1dtpu_neig_fbsb() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1365 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1366 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1367 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1368 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1369 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1370 #if ((REL99 == 1) && (FF_BHO == 1)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1371 /*void l1dtpu_neig_fbsb(UWORD16 radio_freq, WORD8 agc, UWORD8 lna_off |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1372 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1373 ,UWORD8 if_ctl |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1374 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1375 )*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1376 void l1dtpu_neig_fbsb(UWORD16 radio_freq, WORD8 agc, UWORD8 lna_off) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1377 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1378 #if TESTMODE |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1379 if (!l1_config.agc_enable) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1380 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1381 // AGC gain can only be controlled in 2dB steps as the bottom bit (bit zero) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1382 // corresponds to the lna_off bit |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1383 agc = l1_config.tmode.rx_params.agc; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1384 lna_off = l1_config.tmode.rx_params.lna_off; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1385 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1386 #endif // TESTMODE |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1387 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1388 l1dmacro_rx_synth (radio_freq); // pgme SYNTH. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1389 /*l1dmacro_agc(radio_freq, agc, lna_off |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1390 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1391 ,if_ctl |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1392 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1393 ); // pgme AGC. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1394 */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1395 l1dmacro_agc (radio_freq,agc, lna_off |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1396 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1397 ,L1_CTL_LOW_IF |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1398 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1399 ); // pgme AGC. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1400 #if (L1_MADC_ON == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1401 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1402 l1dmacro_rx_fbsb(radio_freq,INACTIVE); // pgm FB acquisition. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1403 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1404 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1405 l1dmacro_rx_fbsb(radio_freq); // pgm FB acquisition.- sajal commented |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1406 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1407 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1408 #endif // #if ((REL99 == 1) && (FF_BHO == 1)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1409 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1410 /* l1dtpu_neig_sb26() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1411 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1412 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1413 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1414 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1415 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1416 void l1dtpu_neig_sb26(UWORD16 radio_freq, WORD8 agc, UWORD8 lna_off, UWORD32 time_alignmt, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1417 UWORD32 fn_offset, UWORD32 offset_serv |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1418 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1419 ,UWORD8 if_ctl |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1420 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1421 ) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1422 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1423 UWORD16 offset_neigh; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1424 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1425 #if TESTMODE |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1426 if (!l1_config.agc_enable) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1427 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1428 // AGC gain can only be controlled in 2dB steps as the bottom bit (bit zero) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1429 // corresponds to the lna_off bit |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1430 agc = l1_config.tmode.rx_params.agc; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1431 lna_off = l1_config.tmode.rx_params.lna_off; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1432 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1433 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1434 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1435 // compute offset neighbour... |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1436 offset_neigh = offset_serv + time_alignmt; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1437 if(offset_neigh >= TPU_CLOCK_RANGE) offset_neigh -= TPU_CLOCK_RANGE; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1438 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1439 if(fn_offset != 0) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1440 l1dmacro_offset (offset_neigh, 0); // 1 NOP in some case |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1441 else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1442 l1dmacro_offset (offset_neigh, l1_config.params.fb26_change_offset_time); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1443 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1444 l1dmacro_rx_synth(radio_freq); // pgme SYNTH. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1445 l1dmacro_agc(radio_freq, agc, lna_off |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1446 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1447 ,if_ctl |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1448 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1449 ); // pgme AGC. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1450 #if (L1_MADC_ON == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1451 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1452 l1dmacro_rx_sb (radio_freq, INACTIVE); // pgm SB acquisition. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1453 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1454 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1455 l1dmacro_rx_sb (radio_freq); // pgm SB acquisition. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1456 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1457 l1dmacro_offset (offset_serv, IMM); // Restore offset with serving value. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1458 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1459 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1460 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1461 /* l1dtpu_serv_rx_nb() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1462 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1463 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1464 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1465 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1466 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1467 void l1dtpu_serv_rx_nb(UWORD16 radio_freq, WORD8 agc, UWORD8 lna_off, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1468 UWORD32 synchro_serv,UWORD32 new_offset,BOOL change_offset, |
95
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
1469 UWORD8 adc_active |
94
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1470 #if(RF_FAM == 61) |
95
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
1471 , UWORD8 csf_filter_choice |
94
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1472 , UWORD8 if_ctl |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1473 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1474 #if (NEW_SNR_THRESHOLD == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1475 , UWORD8 saic_flag |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1476 #endif/* NEW_SNR_THRESHOLD == 1*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1477 ) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1478 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1479 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1480 #if (CODE_VERSION == SIMULATION) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1481 UWORD32 tpu_w_page; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1482 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1483 if (hw.tpu_r_page==0) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1484 tpu_w_page=1; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1485 else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1486 tpu_w_page=0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1487 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1488 // Give the Ts related to the L1s |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1489 hw.rx_id[tpu_w_page][0]= ((TPU_CLOCK_RANGE+new_offset-synchro_serv)%TPU_CLOCK_RANGE)/TN_WIDTH; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1490 hw.num_rx[tpu_w_page][0]=1; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1491 hw.rx_group_id[tpu_w_page]=1; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1492 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1493 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1494 #if TESTMODE |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1495 if (!l1_config.agc_enable) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1496 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1497 // AGC gain can only be controlled in 2dB steps as the bottom bit (bit zero) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1498 // corresponds to the lna_off bit |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1499 agc = l1_config.tmode.rx_params.agc; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1500 lna_off = l1_config.tmode.rx_params.lna_off; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1501 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1502 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1503 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1504 l1dmacro_synchro (l1_config.params.rx_change_synchro_time, synchro_serv); // Adjust serving OFFSET. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1505 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1506 #if L2_L3_SIMUL |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1507 #if (DEBUG_TRACE == BUFFER_TRACE_OFFSET) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1508 buffer_trace(3, 0x43, synchro_serv,l1s.actual_time.fn,0); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1509 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1510 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1511 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1512 // Need to slide offset to cope with the new synchro. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1513 if(change_offset) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1514 l1dmacro_offset(new_offset, l1_config.params.rx_change_offset_time); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1515 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1516 l1dmacro_rx_synth(radio_freq); // load SYNTH. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1517 if(adc_active == ACTIVE) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1518 l1dmacro_adc_read_rx(); // pgme ADC measurement |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1519 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1520 l1dmacro_agc (radio_freq, agc, lna_off |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1521 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1522 ,if_ctl |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1523 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1524 ); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1525 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1526 #if TESTMODE && (CODE_VERSION != SIMULATION) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1527 // Continuous mode: Rx continuous scenario only on START_RX state. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1528 if ((l1_config.TestMode) && |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1529 (l1_config.tmode.rf_params.tmode_continuous == TM_START_RX_CONTINUOUS)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1530 #if (L1_MADC_ON == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1531 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1532 l1dmacro_rx_cont (FALSE, radio_freq,adc_active,csf_filter_choice |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1533 #if (NEW_SNR_THRESHOLD == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1534 ,saic_flag |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1535 #endif /* NEW_SNR_THRESHOLD*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1536 ); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1537 #endif /* RF_FAM == 61*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1538 #else /* L1_MADC_ON == 1 */ |
95
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
1539 #if (RF_FAM == 61) |
94
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1540 l1dmacro_rx_cont (FALSE, radio_freq,csf_filter_choice); |
95
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
1541 #else |
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
1542 l1dmacro_rx_cont (FALSE, radio_freq); |
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
1543 #endif |
94
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1544 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1545 //TBD Danny New MAcro for Cont Tx reqd, to use only External Trigger |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1546 else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1547 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1548 #if ( L1_MADC_ON == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1549 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1550 l1dmacro_rx_nb (radio_freq, adc_active, csf_filter_choice |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1551 #if (NEW_SNR_THRESHOLD == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1552 ,saic_flag |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1553 #endif /* NEW_SNR_THRESHOLD*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1554 ); // RX window for NB. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1555 #endif /* RF_FAM == 61*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1556 #else /* L1_MADC_ON == 1*/ |
95
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
1557 #if (RF_FAM == 61) |
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
1558 l1dmacro_rx_nb (radio_freq, csf_filter_choice); // RX window for NB. |
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
1559 #else |
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
1560 l1dmacro_rx_nb (radio_freq); // RX window for NB. |
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
1561 #endif |
94
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1562 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1563 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1564 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1565 l1ddsp_load_afc(l1s.afc); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1566 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1567 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1568 l1dtpu_load_afc(l1s.afc); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1569 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1570 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1571 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1572 if(change_offset) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1573 l1dmacro_offset(synchro_serv, IMM); // Restore offset. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1574 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1575 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1576 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1577 /* l1dtpu_serv_tx_nb() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1578 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1579 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1580 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1581 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1582 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1583 void l1dtpu_serv_tx_nb(UWORD16 radio_freq, UWORD8 timing_advance, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1584 UWORD32 offset_serv, UWORD8 txpwr, UWORD8 adc_active) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1585 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1586 WORD32 time; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1587 UWORD32 offset_tx; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1588 UWORD32 timing_advance_in_qbit = (UWORD32)timing_advance << 2; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1589 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1590 #if (CODE_VERSION == SIMULATION) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1591 UWORD32 tpu_w_page; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1592 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1593 if (hw.tpu_r_page==0) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1594 tpu_w_page=1; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1595 else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1596 tpu_w_page=0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1597 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1598 hw.tx_id[tpu_w_page][0]=3;// MS synchronized on TN=0 for RX => TN=3 for TX |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1599 hw.num_tx[tpu_w_page][0]=1; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1600 hw.tx_group_id[tpu_w_page]=1; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1601 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1602 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1603 // Reset timing advance if TA_ALGO not enabled. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1604 #if !TA_ALGO |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1605 timing_advance_in_qbit = 0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1606 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1607 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1608 // Compute offset value for TX. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1609 // PRG_TX has become variable, no longer contained in TIME_OFFSET_TX ! |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1610 offset_tx = (offset_serv + TIME_OFFSET_TX-l1_config.params.prg_tx_gsm - timing_advance_in_qbit) ; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1611 if (offset_tx >= TPU_CLOCK_RANGE) offset_tx -= TPU_CLOCK_RANGE; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1612 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1613 // Check that RX controle has been already installed. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1614 // Offset for TX must be set an immediately if RX is there else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1615 // it must be performed EPSILON_SYNC before current offset time. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1616 if( l1s.tpu_ctrl_reg & CTRL_RX ) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1617 time = l1_config.params.tx_change_offset_time - l1_config.params.prg_tx_gsm; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1618 else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1619 time = TPU_CLOCK_RANGE - EPSILON_SYNC; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1620 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1621 l1dmacro_offset (offset_tx, time); // load OFFSET for TX before each burst. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1622 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1623 #if L2_L3_SIMUL |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1624 #if (DEBUG_TRACE == BUFFER_TRACE_OFFSET) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1625 buffer_trace(2, offset_tx,l1s.actual_time.fn,0,0); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1626 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1627 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1628 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1629 l1dmacro_tx_synth(radio_freq); // load SYNTH. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1630 #if TESTMODE && (CODE_VERSION != SIMULATION) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1631 // Continuous mode: Tx continuous scenario only on START_TX state. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1632 #if (RF_FAM != 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1633 if ((l1_config.TestMode) && |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1634 (l1_config.tmode.rf_params.tmode_continuous == TM_START_TX_CONTINUOUS)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1635 l1dmacro_tx_cont (radio_freq, txpwr); // TX window for NB. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1636 else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1637 #endif // RF_FAM != 61 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1638 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1639 // NOTE: In Test Mode and in TX Continuous, APC control is in manual mode |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1640 // This is done in l1tm_async.c |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1641 if ((l1_config.TestMode) && |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1642 (l1_config.tmode.rf_params.tmode_continuous == TM_START_TX_CONTINUOUS)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1643 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1644 // NOTE: APC is set in manual mode from l1tm_async.c |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1645 l1dmacro_tx_cont (radio_freq, txpwr); // TX window for NB. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1646 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1647 else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1648 #endif // RF_FAM == 61 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1649 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1650 l1dmacro_tx_nb (radio_freq, txpwr, adc_active); // TX window for NB. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1651 // TX window for NB. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1652 l1dmacro_offset (offset_serv, IMM); // Restore offset with serving value. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1653 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1654 #if L2_L3_SIMUL |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1655 #if (DEBUG_TRACE == BUFFER_TRACE_OFFSET) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1656 buffer_trace(2, offset_serv,l1s.actual_time.fn,0,0); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1657 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1658 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1659 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1660 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1661 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1662 /* l1dtpu_neig_rx_nb() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1663 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1664 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1665 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1666 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1667 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1668 void l1dtpu_neig_rx_nb(UWORD16 radio_freq, WORD8 agc, UWORD8 lna_off, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1669 UWORD32 time_alignmt, UWORD32 offset_serv, UWORD8 reload_flag, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1670 UWORD8 nop |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1671 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1672 ,UWORD8 if_ctl |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1673 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1674 #if (NEW_SNR_THRESHOLD == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1675 ,UWORD8 saic_flag |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1676 #endif /* NEW_SNR_THRESHOLD*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1677 ) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1678 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1679 UWORD32 offset_neigh; |
95
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
1680 #if (RF_FAM == 61) |
94
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1681 // By default we choose the hardware filter for neighbour Normal Bursts |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1682 UWORD8 csf_filter_choice = L1_SAIC_HARDWARE_FILTER; |
95
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
1683 #endif |
94
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1684 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1685 #if TESTMODE |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1686 if (!l1_config.agc_enable) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1687 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1688 // AGC gain can only be controlled in 2dB steps as the bottom bit (bit zero) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1689 // corresponds to the lna_off bit |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1690 agc = l1_config.tmode.rx_params.agc; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1691 lna_off = l1_config.tmode.rx_params.lna_off; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1692 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1693 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1694 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1695 // compute offset neighbour... |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1696 offset_neigh = (offset_serv + time_alignmt) ; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1697 if (offset_neigh >= TPU_CLOCK_RANGE) offset_neigh -= TPU_CLOCK_RANGE; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1698 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1699 l1dmacro_offset (offset_neigh, l1_config.params.rx_change_offset_time); // load OFFSET with NEIGHBOUR value. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1700 // Insert 1 NOP to correct the EPSILON_SYNC side effect |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1701 if (nop ==1) l1dmacro_offset (offset_neigh,0); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1702 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1703 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1704 l1dmacro_rx_synth(radio_freq); // load SYNTH. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1705 l1dmacro_agc (radio_freq, agc, lna_off |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1706 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1707 ,if_ctl |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1708 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1709 ); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1710 #if (L1_MADC_ON == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1711 #if (RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1712 l1dmacro_rx_nb (radio_freq, INACTIVE, csf_filter_choice |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1713 #if (NEW_SNR_THRESHOLD == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1714 ,saic_flag |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1715 #endif /* NEW_SNR_THRESHOLD*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1716 ) ; // RX window for NB. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1717 #endif /* RF_FAM == 61*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1718 #else /* L1_MADC_ON == 1*/ |
95
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
1719 #if (RF_FAM == 61) |
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
1720 l1dmacro_rx_nb (radio_freq, csf_filter_choice); // RX window for NB. |
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
1721 #else |
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
1722 l1dmacro_rx_nb (radio_freq); // RX window for NB. |
6062d349e747
l1_drive.c: fixes from the freecalypso-sw/gsm-fw version
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
94
diff
changeset
|
1723 #endif |
94
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1724 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1725 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1726 // Restore offset with serving value. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1727 if(reload_flag == TRUE) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1728 l1dmacro_offset (offset_serv, IMM); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1729 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1730 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1731 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1732 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1733 /* l1dtpu_serv_tx_ra() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1734 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1735 /* Parameters : "burst_id" gives the burst identifier */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1736 /* which is used for offset management. */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1737 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1738 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1739 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1740 void l1dtpu_serv_tx_ra(UWORD16 radio_freq, UWORD32 offset_serv, UWORD8 txpwr, UWORD8 adc_active) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1741 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1742 WORD32 time; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1743 UWORD32 offset_tx; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1744 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1745 // Compute offset value for TX. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1746 // Rem: Timing Advance is always 0 for a RA. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1747 // PRG_TX has become variable, no longer contained in TIME_OFFSET_TX ! |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1748 offset_tx = (offset_serv + TIME_OFFSET_TX-l1_config.params.prg_tx_gsm); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1749 if (offset_tx >= TPU_CLOCK_RANGE) offset_tx -= TPU_CLOCK_RANGE; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1750 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1751 // Check that RX controle has been already installed. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1752 // Offset for TX must be set an immediately if RX is there else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1753 // it must be performed EPSILON_SYNC before current offset time. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1754 if( l1s.tpu_ctrl_reg & CTRL_RX ) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1755 time = l1_config.params.tx_change_offset_time - l1_config.params.prg_tx_gsm; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1756 else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1757 time = TPU_CLOCK_RANGE - EPSILON_SYNC; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1758 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1759 l1dmacro_offset (offset_tx, time); // load OFFSET for TX before each burst. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1760 #if L2_L3_SIMUL |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1761 #if (DEBUG_TRACE == BUFFER_TRACE_OFFSET) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1762 buffer_trace(2, offset_tx,l1s.actual_time.fn,0,0); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1763 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1764 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1765 l1dmacro_tx_synth(radio_freq); // load SYNTH. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1766 l1dmacro_tx_ra (radio_freq, txpwr,adc_active); // TX window for RA. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1767 l1dmacro_offset (offset_serv, IMM); // Restore offset with serving value. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1768 #if L2_L3_SIMUL |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1769 #if (DEBUG_TRACE == BUFFER_TRACE_OFFSET) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1770 buffer_trace(2, offset_serv,l1s.actual_time.fn,0,0); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1771 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1772 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1773 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1774 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1775 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1776 /* l1dtpu_end_scenario() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1777 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1778 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1779 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1780 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1781 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1782 void l1dtpu_end_scenario(void) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1783 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1784 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1785 // write IDLE at end of TPU page |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1786 // TPU_ENB and TPU_PAG are set in L1DMACRO_IDLE(). The TPU change |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1787 // is executed by the TPU itself and the TPU pointer is reset to |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1788 // start of page by l1dmacro_idle(); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1789 l1dmacro_idle(); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1790 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1791 #if (CODE_VERSION == SIMULATION) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1792 #if LOGTPU_TRACE |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1793 log_macro(); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1794 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1795 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1796 // init pointer within new TPU page at 1st line |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1797 #if (CODE_VERSION == SIMULATION) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1798 // set TPU_ENB, TPU_PAG for communication interrupt |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1799 l1s_tpu_com.reg_cmd->tpu_pag_bit = l1s_tpu_com.tpu_w_page; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1800 l1s_tpu_com.reg_cmd->tpu_enb_bit = ON; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1801 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1802 // change TPU and DSP page pointer for next control |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1803 l1s_tpu_com.tpu_w_page ^= 1; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1804 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1805 // points on new "write TPU page"... |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1806 l1s_tpu_com.tpu_page_ptr=&(tpu.buf[l1s_tpu_com.tpu_w_page].line[0]); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1807 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1808 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1809 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1810 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1811 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1812 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1813 /* l1d_reset_hw() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1814 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1815 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1816 /* Return : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1817 /* Functionality : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1818 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1819 void l1d_reset_hw(UWORD32 offset_value) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1820 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1821 #if (CODE_VERSION == SIMULATION) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1822 // Reset DSP write/read page, Reset TPU write page, reset "used" flag. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1823 l1s_dsp_com.dsp_w_page = 0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1824 l1s_dsp_com.dsp_r_page = 0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1825 l1s_tpu_com.tpu_w_page = 0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1826 l1s_dsp_com.dsp_r_page_used = 0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1827 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1828 // Reset communication pointers. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1829 l1s_dsp_com.dsp_ndb_ptr = &(buf.ndb); // MCU<->DSP comm. read/write (Non Double Buffered comm. memory). |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1830 l1s_dsp_com.dsp_db_r_ptr = &(buf.mcu_rd[l1s_dsp_com.dsp_r_page]); // MCU<->DSP comm. read page (Double Buffered comm. memory). |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1831 l1s_dsp_com.dsp_db_w_ptr = &(buf.mcu_wr[l1s_dsp_com.dsp_w_page]); // MCU<->DSP comm. write page (Double Buffered comm. memory). |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1832 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1833 // Reset task commands. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1834 l1s_dsp_com.dsp_db_w_ptr->d_task_d = NO_DSP_TASK; // Init. RX task to NO TASK. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1835 l1s_dsp_com.dsp_db_w_ptr->d_task_u = NO_DSP_TASK; // Init. TX task to NO TASK. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1836 l1s_dsp_com.dsp_db_w_ptr->d_task_ra = NO_DSP_TASK; // Init. RA task to NO TASK. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1837 l1s_dsp_com.dsp_db_w_ptr->d_task_md = NO_DSP_TASK; // Init. MONITORING task to NO TASK. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1838 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1839 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1840 //Reset the TCH channel description |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1841 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_tch = 0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1842 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1843 #if (L1_GPRS) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1844 // Reset communication pointers. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1845 l1ps_dsp_com.pdsp_db_r_ptr = &(buf.mcu_rd_gprs[l1s_dsp_com.dsp_r_page]); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1846 l1ps_dsp_com.pdsp_db_w_ptr = &(buf.mcu_wr_gprs[l1s_dsp_com.dsp_w_page]); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1847 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1848 // Reset MCU->DSP page. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1849 l1ps_reset_db_mcu_to_dsp(l1ps_dsp_com.pdsp_db_w_ptr); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1850 #endif // L1_GPRS |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1851 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1852 // Direct access to TPU_RESET_BIT. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1853 l1s_tpu_com.reg_cmd->tpu_reset_bit = ON; // Reset TPU. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1854 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1855 // Reset TPU_ENB, DSP_ENB and TPU_PAG, DSP_PAG for communication interrupt |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1856 l1s_tpu_com.reg_cmd->tpu_pag_bit = 0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1857 l1s_tpu_com.reg_cmd->dsp_pag_bit = 0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1858 l1s_tpu_com.reg_cmd->tpu_enb_bit = OFF; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1859 l1s_tpu_com.reg_cmd->dsp_enb_bit = OFF; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1860 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1861 // Init pointer within TPU page 0 at 1st line |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1862 l1s_tpu_com.tpu_page_ptr = &(tpu.buf[0].line[0]); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1863 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1864 // Load offset register according to serving cell. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1865 l1dmacro_offset(offset_value, IMM); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1866 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1867 #else // NOT_SIMULATION |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1868 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1869 // Reset DSP write/read page, Reset TPU write page, reset "used" flag. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1870 l1s_dsp_com.dsp_w_page = 0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1871 l1s_dsp_com.dsp_r_page = 0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1872 l1s_tpu_com.tpu_w_page = 0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1873 l1s_dsp_com.dsp_r_page_used = 0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1874 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1875 // Reset communication pointers. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1876 l1s_dsp_com.dsp_ndb_ptr = (T_NDB_MCU_DSP *) NDB_ADR; // MCU<->DSP comm. read/write (Non Double Buffered comm. memory). |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1877 l1s_dsp_com.dsp_db_r_ptr = (T_DB_DSP_TO_MCU *) DB_R_PAGE_0; // MCU<->DSP comm. read page (Double Buffered comm. memory). |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1878 l1s_dsp_com.dsp_db_w_ptr = (T_DB_MCU_TO_DSP *) DB_W_PAGE_0; // MCU<->DSP comm. write page (Double Buffered comm. memory). |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1879 l1s_dsp_com.dsp_param_ptr= (T_PARAM_MCU_DSP *) PARAM_ADR; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1880 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1881 #if (DSP == 38) || (DSP == 39) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1882 l1s_dsp_com.dsp_db_common_w_ptr = (T_DB_COMMON_MCU_TO_DSP *) DB_COMMON_W_PAGE_0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1883 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1884 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1885 // Reset task commands. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1886 l1s_dsp_com.dsp_db_w_ptr->d_task_d = NO_DSP_TASK; // Init. RX task to NO TASK. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1887 l1s_dsp_com.dsp_db_w_ptr->d_task_u = NO_DSP_TASK; // Init. TX task to NO TASK. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1888 l1s_dsp_com.dsp_db_w_ptr->d_task_ra = NO_DSP_TASK; // Init. RA task to NO TASK. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1889 l1s_dsp_com.dsp_db_w_ptr->d_task_md = NO_DSP_TASK; // Init. MONITORING task to NO TASK. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1890 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1891 //Reset the TCH channel description |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1892 l1s_dsp_com.dsp_db_w_ptr->d_ctrl_tch = 0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1893 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1894 // Clear DSP_PAG bit |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1895 #if (DSP == 33) || (DSP == 34) || (DSP == 35) || (DSP == 36) || (DSP == 37) || (DSP == 38) || (DSP == 39) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1896 l1s_dsp_com.dsp_ndb_ptr->d_dsp_page = 0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1897 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1898 l1s_dsp_com.dsp_param_ptr->d_dsp_page = 0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1899 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1900 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1901 #if (L1_GPRS) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1902 // Reset communication pointers. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1903 l1ps_dsp_com.pdsp_ndb_ptr = (T_NDB_MCU_DSP_GPRS *) NDB_ADR_GPRS; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1904 l1ps_dsp_com.pdsp_db_r_ptr = (T_DB_DSP_TO_MCU_GPRS *) DB_R_PAGE_0_GPRS; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1905 l1ps_dsp_com.pdsp_db_w_ptr = (T_DB_MCU_TO_DSP_GPRS *) DB_W_PAGE_0_GPRS; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1906 l1ps_dsp_com.pdsp_param_ptr= (T_PARAM_MCU_DSP_GPRS *) PARAM_ADR_GPRS; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1907 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1908 // Reset MCU->DSP page. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1909 l1ps_reset_db_mcu_to_dsp(l1ps_dsp_com.pdsp_db_w_ptr); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1910 #endif // L1_GPRS |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1911 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1912 #if (DSP_DEBUG_TRACE_ENABLE == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1913 l1s_dsp_com.dsp_db2_current_r_ptr = (T_DB2_DSP_TO_MCU *) DB2_R_PAGE_0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1914 l1s_dsp_com.dsp_db2_other_r_ptr = (T_DB2_DSP_TO_MCU *) DB2_R_PAGE_1; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1915 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1916 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1917 // Reset TPU and Reload offset register with Serving value. |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1918 // Clear TPU_PAG |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1919 l1dmacro_reset_hw(offset_value); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1920 #endif // NOT_SIMULATION |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1921 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1922 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1923 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1924 #if(RF_FAM == 61) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1925 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1926 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1927 /* l1apc_init_ramp_tables() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1928 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1929 /* Parameters : void */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1930 /* Return : void */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1931 /* Functionality : This would copy the Ramp table */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1932 /* values to the MCU DSP API */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1933 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1934 void l1dapc_init_ramp_tables(void) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1935 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1936 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1937 #if (CODE_VERSION == SIMULATION) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1938 // Do Nothing there is no APC task |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1939 #else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1940 #if ( DSP == 38) || (DSP == 39) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1941 // Load RAMP up/down in NDB memory... |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1942 if (l1_config.tx_pwr_code == 0) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1943 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1944 Cust_get_ramp_tab( l1s_dsp_com.dsp_ndb_ptr->a_drp_ramp, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1945 0 /* not used */, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1946 0 /* not used */, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1947 1 /* arbitrary value for arfcn*/); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1948 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1949 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1950 else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1951 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1952 Cust_get_ramp_tab( l1s_dsp_com.dsp_ndb_ptr->a_drp_ramp, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1953 5 /* arbitrary value working in any case */, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1954 5 /* arbitrary value working in any case */, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1955 1 /* arbitrary value for arfcn*/); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1956 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1957 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1958 // Is it required to load ramptables for GPRS a_drp2_ramp_gprs |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1959 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1960 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1961 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1962 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1963 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1964 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1965 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1966 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1967 /* l1ddsp_apc_load_apcctrl2 */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1968 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1969 /* Parameters : void */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1970 /* Return : void */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1971 /* Functionality : This would copy the Ramp table */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1972 /* values to the MCU DSP API */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1973 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1974 void l1ddsp_apc_load_apcctrl2(UWORD16 apcctrl2) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1975 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1976 l1s_dsp_com.dsp_ndb_ptr->d_apcctrl2 = ((apcctrl2) | (0x8000)); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1977 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1978 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1979 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1980 /* l1ddsp_apc_set_manual_mode */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1981 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1982 /* Parameters : void */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1983 /* Return : void */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1984 /* Functionality : This would set the APC in manual */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1985 /* OR external trigger mode */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1986 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1987 void l1ddsp_apc_set_manual_mode(void) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1988 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1989 l1s_dsp_com.dsp_ndb_ptr->d_apcctrl2 |= ((APC_APC_MODE) | (0x8000)); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1990 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1991 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1992 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1993 /* l1ddsp_apc_set_automatic_mode */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1994 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1995 /* Parameters : void */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1996 /* Return : void */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1997 /* Functionality : This would set APC in automatic */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1998 /* OR internal sequencer mode */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1999 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2000 void l1ddsp_apc_set_automatic_mode(void) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2001 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2002 l1s_dsp_com.dsp_ndb_ptr->d_apcctrl2 &= ~(APC_APC_MODE); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2003 l1s_dsp_com.dsp_ndb_ptr->d_apcctrl2 |= (0x8000); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2004 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2005 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2006 #ifdef TESTMODE |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2007 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2008 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2009 /* l1ddsp_apc_load_apclev */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2010 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2011 /* Parameters : void */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2012 /* Return : void */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2013 /* Functionality : This function writes the apclev */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2014 /* val into the APCLEV register via DSP */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2015 /* NOTE: Used only in TESTMODE and only when */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2016 /* l1_config.tmode.rf_params.down_up == TMODE_UPLINK; */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2017 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2018 void l1ddsp_apc_load_apclev(UWORD16 apclev) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2019 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2020 l1s_dsp_com.dsp_ndb_ptr->d_apclev = ((apclev) | (0x8000)); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2021 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2022 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2023 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2024 #endif // TESTMODE |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2025 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2026 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2027 #if FF_L1_IT_DSP_DTX |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2028 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2029 /* l1ddsp_dtx_interrupt_pending() */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2030 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2031 /* Parameters : */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2032 /* Return : DTX interrupt status */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2033 /* Functionality : Test and clear the DTX IT pending */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2034 /* flag for DSP ISR screening purpose */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2035 /*-------------------------------------------------------*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2036 BOOL l1ddsp_dtx_interrupt_pending(void) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2037 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2038 if (l1s_dsp_com.dsp_ndb_ptr->d_dsp_hint_flag & (2 << B_DTX_HINT_ISSUED)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2039 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2040 // Flag HISR to be scheduled |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2041 l1a_apihisr_com.dtx.pending = TRUE; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2042 // Clear API ISR condition |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2043 l1s_dsp_com.dsp_ndb_ptr->d_dsp_hint_flag &= ~(2 << B_DTX_HINT_ISSUED); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2044 return TRUE; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2045 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2046 else |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2047 return FALSE; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2048 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2049 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2050 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2051 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2052 #define L1_DEBUG_IQ_DUMP 0 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2053 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2054 #if (L1_DEBUG_IQ_DUMP == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2055 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2056 #define IQ_DUMP_MAX_LOG_SIZE (400) /* i.e. 200 I-Q Sample Pair */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2057 #define IQ_DUMP_BUFFER_SIZE (1280) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2058 #define L1_DSP_DUMP_IQ_BUFFER_PAGE0 (0xFFD00000 + ((0x2000 - 0x800)*2)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2059 #define L1_DSP_DUMP_IQ_BUFFER_PAGE1 (0xFFD00000 + ((0x2190 - 0x800)*2)) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2060 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2061 typedef struct |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2062 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2063 UWORD8 task; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2064 UWORD8 hole; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2065 UWORD16 size; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2066 UWORD16 fn_mod42432; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2067 UWORD16 iq_sample[IQ_DUMP_MAX_LOG_SIZE]; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2068 }T_IQ_LOG_BUFFER; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2069 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2070 #pragma DATA_SECTION(iq_dump_buffer,".debug_data"); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2071 T_IQ_LOG_BUFFER iq_dump_buffer[IQ_DUMP_BUFFER_SIZE]; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2072 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2073 UWORD32 iq_dump_buffer_log_index = 0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2074 UWORD32 iq_overflow_ind=0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2075 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2076 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2077 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2078 void l1ddsp_read_iq_dump(UWORD8 task) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2079 { |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2080 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2081 #if (L1_DEBUG_IQ_DUMP == 1) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2082 UWORD16 *p_dsp_iq_buffer_ptr; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2083 UWORD16 size; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2084 int i; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2085 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2086 /* get the page logic*/ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2087 p_dsp_iq_buffer_ptr = (UWORD16 *)(L1_DSP_DUMP_IQ_BUFFER_PAGE0); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2088 if(l1s_dsp_com.dsp_r_page){ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2089 p_dsp_iq_buffer_ptr = (UWORD16 *)(L1_DSP_DUMP_IQ_BUFFER_PAGE1); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2090 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2091 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2092 /* */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2093 size = *p_dsp_iq_buffer_ptr; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2094 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2095 if(size == 0) |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2096 return; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2097 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2098 /* size given by DSP is in units of I-Q sample pair */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2099 if(size > (IQ_DUMP_MAX_LOG_SIZE /2)){ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2100 size = (IQ_DUMP_MAX_LOG_SIZE/2); |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2101 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2102 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2103 /* make size as zero again */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2104 *p_dsp_iq_buffer_ptr++ = 0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2105 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2106 if(iq_dump_buffer_log_index >= IQ_DUMP_BUFFER_SIZE){ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2107 iq_overflow_ind=1; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2108 iq_dump_buffer_log_index = 0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2109 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2110 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2111 iq_dump_buffer[iq_dump_buffer_log_index].task = task; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2112 iq_dump_buffer[iq_dump_buffer_log_index].hole = 0; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2113 iq_dump_buffer[iq_dump_buffer_log_index].size = size; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2114 iq_dump_buffer[iq_dump_buffer_log_index].fn_mod42432 = l1s.actual_time.fn_mod42432; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2115 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2116 memcpy(&iq_dump_buffer[iq_dump_buffer_log_index].iq_sample[0], |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2117 p_dsp_iq_buffer_ptr, |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2118 size*2*2); /* size * 2 (as size is in IQsample pair) * 2 (to convert to bytes) */ |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2119 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2120 iq_dump_buffer_log_index = iq_dump_buffer_log_index + 1; |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2121 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2122 #endif |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2123 } |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2124 |
9348cbd02cab
l1_drive.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2125 |