FreeCalypso > hg > tcs211-l1-reconst
annotate chipsetsw/layer1/cfile/l1_func.c @ 100:ba58ce852caf
l1_func.c: initial import of LoCosto source
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Thu, 07 Apr 2016 19:16:48 +0000 |
parents | 6814a6bced4f |
children | a103d40accc2 |
rev | line source |
---|---|
100
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1 /************* Revision Controle System Header ************* |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2 * GSM Layer 1 software |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
3 * L1_FUNC.C |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
4 * |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
5 * Filename l1_func.c |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
6 * Copyright 2003 (C) Texas Instruments |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
7 * |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
8 ************* Revision Controle System Header *************/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
9 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
10 #define L1_FUNC_C |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
11 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
12 #include "l1_macro.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
13 #include "l1_confg.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
14 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
15 #if (CODE_VERSION == SIMULATION) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
16 #include <string.h> |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
17 #include "l1_types.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
18 #include "sys_types.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
19 #include "l1_const.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
20 #include "l1_time.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
21 #include "l1_signa.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
22 #if TESTMODE |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
23 #include "l1tm_defty.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
24 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
25 #if (AUDIO_TASK == 1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
26 #include "l1audio_const.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
27 #include "l1audio_cust.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
28 #include "l1audio_defty.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
29 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
30 #if (L1_GTT == 1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
31 #include "l1gtt_const.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
32 #include "l1gtt_defty.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
33 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
34 #if (L1_MP3 == 1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
35 #include "l1mp3_defty.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
36 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
37 #if (L1_MIDI == 1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
38 #include "l1midi_defty.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
39 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
40 //ADDED FOR AAC |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
41 #if (L1_AAC == 1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
42 #include "l1aac_defty.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
43 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
44 #include "l1_defty.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
45 #include "cust_os.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
46 #include "l1_msgty.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
47 #include "l1_varex.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
48 #include "l1_proto.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
49 #include "l1_mftab.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
50 #include "l1_tabs.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
51 #include "l1_ver.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
52 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
53 #if L1_GPRS |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
54 #include "l1p_cons.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
55 #include "l1p_msgt.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
56 #include "l1p_deft.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
57 #include "l1p_vare.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
58 #include "l1p_tabs.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
59 #include "l1p_macr.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
60 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
61 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
62 #include "l1_rf2.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
63 #include <stdio.h> |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
64 #include "sim_cfg.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
65 #include "sim_cons.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
66 #include "sim_def.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
67 #include "sim_var.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
68 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
69 #else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
70 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
71 #include <string.h> |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
72 #include "l1_types.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
73 #include "sys_types.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
74 #include "l1_const.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
75 #include "l1_rf61.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
76 #include "l1_time.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
77 #include "l1_signa.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
78 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
79 #if TESTMODE |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
80 #include "l1tm_defty.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
81 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
82 #if (AUDIO_TASK == 1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
83 #include "l1audio_const.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
84 #include "l1audio_cust.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
85 #include "l1audio_defty.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
86 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
87 #if (L1_GTT == 1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
88 #include "l1gtt_const.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
89 #include "l1gtt_defty.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
90 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
91 #if (L1_MP3 == 1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
92 #include "l1mp3_defty.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
93 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
94 #if (L1_MIDI == 1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
95 #include "l1midi_defty.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
96 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
97 //ADDED FOR AAC |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
98 #if (L1_AAC == 1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
99 #include "l1aac_defty.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
100 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
101 #include "l1_defty.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
102 #include "cust_os.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
103 #include "l1_msgty.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
104 #include "l1_varex.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
105 #include "l1_proto.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
106 #include "l1_mftab.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
107 #include "l1_tabs.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
108 #include "l1_ver.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
109 #include "tpudrv.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
110 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
111 #include "mem.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
112 #include "inth.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
113 #include "clkm.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
114 #include "rhea_arm.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
115 #include "dma.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
116 #include "ulpd.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
117 #include "leadapi.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
118 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
119 #if (OP_L1_STANDALONE) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
120 #if (CHIPSET == 4) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || \ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
121 (CHIPSET == 11) || (CHIPSET == 12) || (CHIPSET == 15) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
122 #include "dynamic_clock.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
123 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
124 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
125 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
126 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
127 #if L1_GPRS |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
128 #include "l1p_cons.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
129 #include "l1p_msgt.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
130 #include "l1p_deft.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
131 #include "l1p_vare.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
132 #include "l1p_tabs.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
133 #include "l1p_macr.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
134 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
135 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
136 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
137 #include "l1_trace.h" |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
138 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
139 #if ((TRACE_TYPE==1) || (TRACE_TYPE==2) || (TRACE_TYPE==3) || (TRACE_TYPE==4) || (TRACE_TYPE==7)) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
140 extern void L1_trace_string(char *s); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
141 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
142 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
143 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
144 #if (CODE_VERSION != SIMULATION) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
145 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
146 /* DSP patch */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
147 #if (DWNLD == NO_DWNLD) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
148 const UWORD8 patch_array[1]; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
149 const UWORD8 DspCode_array[1] ; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
150 const UWORD8 DspData_array[1]; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
151 #elif (DWNLD == PATCH_DWNLD) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
152 extern const UWORD8 patch_array[] ; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
153 const UWORD8 DspCode_array[1] ; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
154 const UWORD8 DspData_array[1]; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
155 #elif (DWNLD == DSP_DWNLD) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
156 const UWORD8 patch_array[1] ; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
157 extern const UWORD8 DspCode_array[] ; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
158 extern const UWORD8 DspData_array[]; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
159 #else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
160 extern const UWORD8 patch_array[] ; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
161 extern const UWORD8 DspCode_array[] ; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
162 extern const UWORD8 DspData_array[]; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
163 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
164 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
165 extern const UWORD8 bootCode[] ; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
166 UWORD32 fn_prev; // Added as a debug stage.. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
167 /* DSP patch */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
168 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
169 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
170 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
171 /* Prototypes of internal functions used in this file. */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
172 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
173 void l1s_init_voice_blocks (void); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
174 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
175 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
176 /* Prototypes of external functions used in this file. */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
177 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
178 void l1dmacro_synchro (UWORD32 when, UWORD32 value); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
179 void LA_ReleaseLead(void); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
180 #if (CODE_VERSION != SIMULATION) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
181 void l1s_audio_path_control (UWORD16 FIR_selection, UWORD16 audio_loop); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
182 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
183 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
184 #if (L1_GPRS) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
185 // external functions from GPRS implementation |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
186 void initialize_l1pvar(void); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
187 void l1pa_reset_cr_freq_list(void); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
188 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
189 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
190 /* dsp_power_on() */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
191 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
192 /* Parameters : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
193 /* Return : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
194 /* Functionality : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
195 /* Remarq : USART Buffer is 256 characters. While USART*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
196 /* is not run during Application_Initialize */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
197 /* (hisrs not served because Nucleus scheduler*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
198 /* is not running yet) : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
199 /* ==> check string size < 256 !!!!!! */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
200 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
201 void dsp_power_on(void) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
202 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
203 UWORD16 dsp_start_address =0 ;//omaps00090550 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
204 UWORD16 param_size; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
205 #if IDS |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
206 UWORD16 param_size2; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
207 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
208 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
209 API i; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
210 API *pt; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
211 volatile WORD16 j; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
212 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
213 T_NDB_MCU_DSP * dsp_ndb_ptr; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
214 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
215 #if (DSP == 34) || (DSP == 35) || (DSP == 36) || (DSP == 37) || (DSP == 38) || (DSP == 39) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
216 static API_SIGNED param_tab[] = { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
217 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
218 D_TRANSFER_RATE, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
219 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
220 // ..................Latencies |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
221 D_LAT_MCU_BRIDGE, D_LAT_MCU_HOM2SAM, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
222 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
223 D_LAT_MCU_BEF_FAST_ACCESS, D_LAT_DSP_AFTER_SAM, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
224 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
225 //...................p_gprs_install_adress |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
226 D_HOLE, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
227 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
228 //...................d_misc_config |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
229 D_MISC_CONFIG, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
230 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
231 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
232 //...................d_cn_sw_workaround |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
233 C_DSP_SW_WORK_AROUND, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
234 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
235 //...................Reserved |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
236 D_HOLE, D_HOLE, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
237 D_HOLE, D_HOLE, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
238 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
239 //...................Frequency burst |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
240 D_FB_MARGIN_BEG, D_FB_MARGIN_END, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
241 D_NSUBB_IDLE, D_NSUBB_DEDIC, D_FB_THR_DET_IACQ, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
242 D_FB_THR_DET_TRACK, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
243 //...................Demodulation |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
244 D_DC_OFF_THRES, D_DUMMY_THRES, D_DEM_POND_GEWL, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
245 D_DEM_POND_RED, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
246 //...................TCH Full Speech |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
247 D_MACCTHRESH1, D_MLDT, D_MACCTHRESH, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
248 D_GU, D_GO, D_ATTMAX, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
249 D_SM, D_B, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
250 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
251 //...................V42 bis |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
252 D_V42B_SWITCH_HYST, D_V42B_SWITCH_MIN, D_V42B_SWITCH_MAX, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
253 D_V42B_RESET_DELAY, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
254 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
255 //...................TCH Half Speech |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
256 D_LDT_HR, D_MACCTRESH_HR, D_MACCTRESH1_HR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
257 D_GU_HR, D_GO_HR, D_B_HR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
258 D_SM_HR, D_ATTMAX_HR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
259 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
260 //...................Added variables for EFR |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
261 C_MLDT_EFR, C_MACCTHRESH_EFR, C_MACCTHRESH1_EFR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
262 C_GU_EFR, C_GO_EFR, C_B_EFR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
263 C_SM_EFR, C_ATTMAX_EFR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
264 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
265 //...................Full rate variables |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
266 D_SD_MIN_THR_TCHFS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
267 D_MA_MIN_THR_TCHFS, D_MD_MAX_THR_TCHFS, D_MD1_MAX_THR_TCHFS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
268 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
269 //...................TCH Half Speech |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
270 D_SD_MIN_THR_TCHHS, D_MA_MIN_THR_TCHHS, D_SD_AV_THR_TCHHS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
271 D_MD_MAX_THR_TCHHS, D_MD1_MAX_THR_TCHHS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
272 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
273 //...................TCH Enhanced Full Rate Speech |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
274 D_SD_MIN_THR_TCHEFS, D_MA_MIN_THR_TCHEFS, D_MD_MAX_THR_TCHEFS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
275 D_MD1_MAX_THR_TCHEFS, D_WED_FIL_INI, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
276 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
277 D_WED_FIL_TC, D_X_MIN, D_X_MAX, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
278 D_SLOPE, D_Y_MIN, D_Y_MAX, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
279 D_WED_DIFF_THRESHOLD,D_MABFI_MIN_THR_TCHHS,D_FACCH_THR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
280 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
281 D_MAX_OVSPD_UL, D_SYNC_THRES, D_IDLE_THRES, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
282 D_M1_THRES, D_MAX_OVSP_DL, D_GSM_BGD_MGT |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
283 }; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
284 param_size = 79; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
285 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
286 #if (OP_L1_STANDALONE) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
287 #if (CHIPSET == 4) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || \ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
288 (CHIPSET == 11) || (CHIPSET == 12) || (CHIPSET == 15) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
289 /* Dynamic clock configuration */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
290 param_tab[0] = p_dynamic_clock_cfg->d_transfer_rate; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
291 param_tab[1] = p_dynamic_clock_cfg->d_lat_mcu_bridge; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
292 param_tab[2] = p_dynamic_clock_cfg->d_lat_mcu_hom2sam; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
293 param_tab[3] = p_dynamic_clock_cfg->d_lat_mcu_bef_fast_access; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
294 param_tab[4] = p_dynamic_clock_cfg->d_lat_dsp_after_sam; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
295 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
296 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
297 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
298 #elif (DSP == 33) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
299 static API_SIGNED param_tab[] = { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
300 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
301 D_TRANSFER_RATE, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
302 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
303 // ..................Latencies |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
304 D_LAT_MCU_BRIDGE, D_LAT_MCU_HOM2SAM, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
305 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
306 D_LAT_MCU_BEF_FAST_ACCESS, D_LAT_DSP_AFTER_SAM, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
307 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
308 //...................p_gprs_install_adress |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
309 D_HOLE, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
310 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
311 //...................d_misc_config |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
312 D_MISC_CONFIG, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
313 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
314 //...................d_cn_sw_workaround |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
315 C_DSP_SW_WORK_AROUND, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
316 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
317 #if DCO_ALGO |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
318 //...................d_cn_dco_param |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
319 C_CN_DCO_PARAM, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
320 #else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
321 //.................. Reserved |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
322 D_HOLE, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
323 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
324 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
325 //...................Reserved |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
326 D_HOLE, D_HOLE, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
327 D_HOLE, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
328 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
329 //...................Frequency burst |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
330 D_FB_MARGIN_BEG, D_FB_MARGIN_END, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
331 D_NSUBB_IDLE, D_NSUBB_DEDIC, D_FB_THR_DET_IACQ, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
332 D_FB_THR_DET_TRACK, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
333 //...................Demodulation |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
334 D_DC_OFF_THRES, D_DUMMY_THRES, D_DEM_POND_GEWL, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
335 D_DEM_POND_RED, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
336 //...................TCH Full Speech |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
337 D_MACCTHRESH1, D_MLDT, D_MACCTHRESH, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
338 D_GU, D_GO, D_ATTMAX, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
339 D_SM, D_B, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
340 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
341 //...................V42 bis |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
342 D_V42B_SWITCH_HYST, D_V42B_SWITCH_MIN, D_V42B_SWITCH_MAX, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
343 D_V42B_RESET_DELAY, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
344 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
345 //...................TCH Half Speech |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
346 D_LDT_HR, D_MACCTRESH_HR, D_MACCTRESH1_HR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
347 D_GU_HR, D_GO_HR, D_B_HR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
348 D_SM_HR, D_ATTMAX_HR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
349 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
350 //...................Added variables for EFR |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
351 C_MLDT_EFR, C_MACCTHRESH_EFR, C_MACCTHRESH1_EFR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
352 C_GU_EFR, C_GO_EFR, C_B_EFR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
353 C_SM_EFR, C_ATTMAX_EFR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
354 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
355 //...................Full rate variables |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
356 D_SD_MIN_THR_TCHFS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
357 D_MA_MIN_THR_TCHFS, D_MD_MAX_THR_TCHFS, D_MD1_MAX_THR_TCHFS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
358 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
359 //...................TCH Half Speech |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
360 D_SD_MIN_THR_TCHHS, D_MA_MIN_THR_TCHHS, D_SD_AV_THR_TCHHS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
361 D_MD_MAX_THR_TCHHS, D_MD1_MAX_THR_TCHHS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
362 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
363 //...................TCH Enhanced Full Rate Speech |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
364 D_SD_MIN_THR_TCHEFS, D_MA_MIN_THR_TCHEFS, D_MD_MAX_THR_TCHEFS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
365 D_MD1_MAX_THR_TCHEFS, D_WED_FIL_INI, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
366 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
367 D_WED_FIL_TC, D_X_MIN, D_X_MAX, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
368 D_SLOPE, D_Y_MIN, D_Y_MAX, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
369 D_WED_DIFF_THRESHOLD,D_MABFI_MIN_THR_TCHHS,D_FACCH_THR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
370 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
371 D_MAX_OVSPD_UL, D_SYNC_THRES, D_IDLE_THRES, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
372 D_M1_THRES, D_MAX_OVSP_DL, D_GSM_BGD_MGT |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
373 }; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
374 param_size = 79; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
375 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
376 #if (OP_L1_STANDALONE) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
377 #if (CHIPSET == 4) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || \ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
378 (CHIPSET == 11) || (CHIPSET == 12) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
379 /* Dynamic clock configuration */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
380 param_tab[0] = p_dynamic_clock_cfg->d_transfer_rate; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
381 param_tab[1] = p_dynamic_clock_cfg->d_lat_mcu_bridge; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
382 param_tab[2] = p_dynamic_clock_cfg->d_lat_mcu_hom2sam; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
383 param_tab[3] = p_dynamic_clock_cfg->d_lat_mcu_bef_fast_access; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
384 param_tab[4] = p_dynamic_clock_cfg->d_lat_dsp_after_sam; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
385 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
386 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
387 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
388 #else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
389 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
390 #if (VOC == FR) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
391 static API_SIGNED param_tab[] = { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
392 //...................Frequency burst |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
393 D_NSUBB_IDLE, D_NSUBB_DEDIC, D_FB_THR_DET_IACQ, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
394 D_FB_THR_DET_TRACK, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
395 //...................Demodulation |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
396 D_DC_OFF_THRES, D_DUMMY_THRES, D_DEM_POND_GEWL, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
397 D_DEM_POND_RED, D_HOLE, D_HOLE, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
398 //...................TCH Full Speech |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
399 D_MACCTHRESH1, D_MLDT, D_MACCTHRESH, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
400 D_GU, D_GO, D_ATTMAX, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
401 D_SM, D_B, D_SD_MIN_THR_TCHFS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
402 D_MA_MIN_THR_TCHFS, D_MD_MAX_THR_TCHFS, D_MD1_MAX_THR_TCHFS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
403 //...................TCH Half Speech |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
404 D_SD_MIN_THR_TCHHS, D_MA_MIN_THR_TCHHS, D_SD_AV_THR_TCHHS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
405 D_MD_MAX_THR_TCHHS, D_MD1_MAX_THR_TCHHS, D_WED_FIL_INI, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
406 D_WED_FIL_TC, D_X_MIN, D_X_MAX, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
407 D_SLOPE, D_Y_MIN, D_Y_MAX, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
408 D_WED_DIFF_THRESHOLD,D_MABFI_MIN_THR_TCHHS,D_FACCH_THR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
409 D_DSP_TEST |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
410 }; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
411 param_size = 38; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
412 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
413 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
414 #if (VOC == FR_HR) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
415 static API_SIGNED param_tab[] = { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
416 //...................Frequency burst |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
417 D_NSUBB_IDLE, D_NSUBB_DEDIC, D_FB_THR_DET_IACQ, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
418 D_FB_THR_DET_TRACK, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
419 //...................Demodulation |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
420 D_DC_OFF_THRES, D_DUMMY_THRES, D_DEM_POND_GEWL, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
421 D_DEM_POND_RED, D_HOLE, D_HOLE, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
422 //...................TCH Full Speech |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
423 D_MACCTHRESH1, D_MLDT, D_MACCTHRESH, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
424 D_GU, D_GO, D_ATTMAX, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
425 D_SM, D_B, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
426 //...................TCH Half Speech |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
427 D_LDT_HR, D_MACCTRESH_HR, D_MACCTRESH1_HR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
428 D_GU_HR, D_GO_HR, D_B_HR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
429 D_SM_HR, D_ATTMAX_HR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
430 //...................TCH Full Speech |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
431 D_SD_MIN_THR_TCHFS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
432 D_MA_MIN_THR_TCHFS, D_MD_MAX_THR_TCHFS, D_MD1_MAX_THR_TCHFS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
433 //...................TCH Half Speech |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
434 D_SD_MIN_THR_TCHHS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
435 D_MA_MIN_THR_TCHHS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
436 D_SD_AV_THR_TCHHS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
437 D_MD_MAX_THR_TCHHS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
438 D_MD1_MAX_THR_TCHHS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
439 D_WED_FIL_INI, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
440 D_WED_FIL_TC, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
441 D_X_MIN, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
442 D_X_MAX, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
443 D_SLOPE, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
444 D_Y_MIN, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
445 D_Y_MAX, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
446 D_WED_DIFF_THRESHOLD, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
447 D_MABFI_MIN_THR_TCHHS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
448 D_FACCH_THR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
449 D_DSP_TEST |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
450 }; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
451 param_size = 46; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
452 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
453 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
454 #if (VOC == FR_EFR) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
455 static API_SIGNED param_tab[] = { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
456 //...................Frequency burst |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
457 D_NSUBB_IDLE, D_NSUBB_DEDIC, D_FB_THR_DET_IACQ, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
458 D_FB_THR_DET_TRACK, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
459 //...................Demodulation |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
460 D_DC_OFF_THRES, D_DUMMY_THRES, D_DEM_POND_GEWL, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
461 D_DEM_POND_RED, D_HOLE, D_HOLE, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
462 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
463 //...................TCH Full Speech |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
464 D_MACCTHRESH1, D_MLDT, D_MACCTHRESH, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
465 D_GU, D_GO, D_ATTMAX, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
466 D_SM, D_B, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
467 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
468 //...................Added variables for EFR |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
469 C_MLDT_EFR, C_MACCTHRESH_EFR, C_MACCTHRESH1_EFR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
470 C_GU_EFR, C_GO_EFR, C_B_EFR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
471 C_SM_EFR, C_ATTMAX_EFR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
472 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
473 //...................Full rate variables |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
474 D_SD_MIN_THR_TCHFS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
475 D_MA_MIN_THR_TCHFS, D_MD_MAX_THR_TCHFS, D_MD1_MAX_THR_TCHFS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
476 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
477 //...................TCH Enhanced Full Rate Speech |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
478 D_SD_MIN_THR_TCHEFS, D_MA_MIN_THR_TCHEFS, D_MD_MAX_THR_TCHEFS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
479 D_MD1_MAX_THR_TCHEFS, D_HOLE, D_WED_FIL_INI, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
480 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
481 D_WED_FIL_TC, D_X_MIN, D_X_MAX, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
482 D_SLOPE, D_Y_MIN, D_Y_MAX, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
483 D_WED_DIFF_THRESHOLD,D_MABFI_MIN_THR_TCHHS,D_FACCH_THR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
484 D_DSP_TEST |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
485 }; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
486 param_size = 46; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
487 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
488 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
489 #if (VOC == FR_HR_EFR) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
490 static API_SIGNED param_tab[] = { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
491 //...................Frequency burst |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
492 D_NSUBB_IDLE, D_NSUBB_DEDIC, D_FB_THR_DET_IACQ, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
493 D_FB_THR_DET_TRACK, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
494 //...................Demodulation |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
495 D_DC_OFF_THRES, D_DUMMY_THRES, D_DEM_POND_GEWL, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
496 D_DEM_POND_RED, D_HOLE, D_TRANSFER_RATE, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
497 //...................TCH Full Speech |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
498 D_MACCTHRESH1, D_MLDT, D_MACCTHRESH, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
499 D_GU, D_GO, D_ATTMAX, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
500 D_SM, D_B, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
501 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
502 //...................TCH Half Speech |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
503 D_LDT_HR, D_MACCTRESH_HR, D_MACCTRESH1_HR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
504 D_GU_HR, D_GO_HR, D_B_HR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
505 D_SM_HR, D_ATTMAX_HR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
506 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
507 //...................Added variables for EFR |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
508 C_MLDT_EFR, C_MACCTHRESH_EFR, C_MACCTHRESH1_EFR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
509 C_GU_EFR, C_GO_EFR, C_B_EFR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
510 C_SM_EFR, C_ATTMAX_EFR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
511 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
512 //...................Full rate variables |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
513 D_SD_MIN_THR_TCHFS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
514 D_MA_MIN_THR_TCHFS, D_MD_MAX_THR_TCHFS, D_MD1_MAX_THR_TCHFS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
515 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
516 //...................TCH Half Speech |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
517 D_SD_MIN_THR_TCHHS, D_MA_MIN_THR_TCHHS, D_SD_AV_THR_TCHHS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
518 D_MD_MAX_THR_TCHHS, D_MD1_MAX_THR_TCHHS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
519 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
520 //...................TCH Enhanced Full Rate Speech |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
521 D_SD_MIN_THR_TCHEFS, D_MA_MIN_THR_TCHEFS, D_MD_MAX_THR_TCHEFS, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
522 D_MD1_MAX_THR_TCHEFS, D_HOLE, D_WED_FIL_INI, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
523 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
524 D_WED_FIL_TC, D_X_MIN, D_X_MAX, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
525 D_SLOPE, D_Y_MIN, D_Y_MAX, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
526 D_WED_DIFF_THRESHOLD,D_MABFI_MIN_THR_TCHHS,D_FACCH_THR, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
527 D_HOLE, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
528 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
529 //...................Data patch provisions |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
530 D_HOLE, D_HOLE, D_HOLE, D_HOLE, D_HOLE, D_HOLE, D_HOLE, D_HOLE, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
531 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
532 //...................Version Number, TI Number |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
533 D_HOLE, D_HOLE, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
534 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
535 // ..................DSP page |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
536 D_DSP_TEST |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
537 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
538 #if IDS |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
539 ,D_MAX_OVSPD_UL, D_SYNC_THRES, D_IDLE_THRES, |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
540 D_M1_THRES, D_MAX_OVSP_DL |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
541 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
542 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
543 }; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
544 param_size = 67; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
545 #if IDS |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
546 // Take care to not erased "d_version_number, d_ti_version and d_dsp_page" wrote by DSP before ARM |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
547 // set PARAM memory |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
548 param_size2 = 5; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
549 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
550 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
551 #endif // (end of DSP != 33 || DSP != 34 || DSP != 35 || DSP != 36) || (DSP != 37) || (DSP != 38) || (DSP != 39) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
552 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
553 // NDB pointer. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
554 dsp_ndb_ptr = (T_NDB_MCU_DSP *) NDB_ADR; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
555 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
556 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
557 //------------- |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
558 // DSP STARTUP |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
559 //------------- |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
560 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
561 #if (TRACE_TYPE==1) || (TRACE_TYPE==2) || (TRACE_TYPE==3) || (TRACE_TYPE==7) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
562 #if (CHIPSET == 1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
563 L1_trace_string ("\n\r\n\rGEMINI/POLESTAR test code\n\r-------------------------"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
564 #elif (CHIPSET == 2) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
565 L1_trace_string ("\n\r\n\rHERCULES test code\n\r------------------"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
566 #elif (CHIPSET == 3) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
567 L1_trace_string ("\n\r\n\rULYSSE/ULYSSE G0 test code\n\r--------------------------"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
568 #elif (CHIPSET == 4) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
569 L1_trace_string ("\n\r\n\rSAMSON test code\n\r----------------"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
570 #elif (CHIPSET == 5) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
571 L1_trace_string ("\n\r\n\rULYSSE G1 test code 13 MHz\n\r-------------------"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
572 #elif (CHIPSET == 6) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
573 L1_trace_string ("\n\r\n\rULYSSE G1 test code 26 MHz\n\r-------------------"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
574 #elif (CHIPSET == 7) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
575 L1_trace_string ("\n\r\n\rCALYPSO Rev A test code\n\r-------------------"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
576 #elif (CHIPSET == 8) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
577 L1_trace_string ("\n\r\n\rCALYPSO Rev B test code\n\r-------------------"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
578 #elif (CHIPSET == 9) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
579 L1_trace_string ("\n\r\n\rULYSSE C035 test code\n\r-------------------"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
580 #elif (CHIPSET == 10) || (CHIPSET == 11) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
581 L1_trace_string ("\n\r\n\rCALYPSO C035 test code\n\r-------------------"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
582 #elif (CHIPSET == 12) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
583 L1_trace_string ("\n\r\n\rCALYPSO PLUS test code\n\r-------------------"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
584 #elif (CHIPSET == 15) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
585 L1_trace_string ("\n\r\n\rLOCOSTO test code\n\r-------------------"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
586 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
587 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
588 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
589 #if (TRACE_TYPE==1) || (TRACE_TYPE==2) || (TRACE_TYPE==3) || (TRACE_TYPE==7) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
590 /* Display Audio Configuration */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
591 L1_trace_string ("\n\rAUDIO: "); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
592 #if (KEYBEEP) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
593 L1_trace_string ("KB "); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
594 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
595 #if (TONE) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
596 L1_trace_string ("TN "); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
597 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
598 #if (MELODY_E1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
599 L1_trace_string ("E1 "); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
600 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
601 #if (MELODY_E2) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
602 L1_trace_string ("E2 "); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
603 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
604 #if (VOICE_MEMO) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
605 L1_trace_string ("VM "); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
606 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
607 #if (L1_VOICE_MEMO_AMR) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
608 L1_trace_string ("VMA "); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
609 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
610 #if (SPEECH_RECO) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
611 L1_trace_string ("SR "); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
612 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
613 #if (L1_NEW_AEC) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
614 L1_trace_string ("NEWAEC "); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
615 #elif (AEC) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
616 L1_trace_string ("AEC "); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
617 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
618 #if (L1_GTT) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
619 L1_trace_string ("GTT "); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
620 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
621 #if (FIR) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
622 L1_trace_string ("FIR "); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
623 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
624 #if (AUDIO_MODE) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
625 L1_trace_string ("AUM "); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
626 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
627 #if (L1_CPORT == 1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
628 L1_trace_string ("CPO "); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
629 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
630 #if (L1_STEREOPATH == 1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
631 L1_trace_string ("STP "); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
632 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
633 #if (L1_EXT_AUDIO_MGT == 1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
634 L1_trace_string ("EAM "); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
635 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
636 L1_trace_string ("\n\r"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
637 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
638 // Release Lead reset before DSP code/patch download to insure proper reset of DSP |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
639 LA_ReleaseLead(); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
640 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
641 // Init PLL : PLONOFF =1, PLMU = 0010 (k=3), PLLNDIV=1, PLLDIV=0 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
642 LA_InitialLeadBoot(bootCode); // Load the bootCode in API |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
643 LA_StartLead(CLKSTART); // LEAD_PLL_CNTL register (on MCU side) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
644 // On SAMSON, only the LEAD reset is released |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
645 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
646 // GSM 1.5 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
647 //----------------------------------------------------------------- |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
648 // After RESET release, DSP is in SAM Mode ! while API_CNTR (0xF900) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
649 // register is in reset state: HOM mode, PLL off, Bridge off. No ws |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
650 // are applied for MCU<-->API access !!!!! So, MCU must wait for |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
651 // end of Leadboot execution before accessing API. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
652 wait_ARM_cycles(convert_nanosec_to_cycles(10000)); // wait 10us |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
653 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
654 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
655 if(l1_config.dwnld == NO_DWNLD) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
656 // NO DOWNLOAD... |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
657 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
658 #if (TRACE_TYPE==1) || (TRACE_TYPE==2) || (TRACE_TYPE==3) || (TRACE_TYPE==7) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
659 L1_trace_string ("\n\r-> No download !!"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
660 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
661 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
662 // Wait for READY status from DSP. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
663 while(*((volatile UWORD16 *)DOWNLOAD_STATUS) != LEAD_READY); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
664 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
665 // Set DSP start address. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
666 dsp_start_address = DSP_START; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
667 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
668 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
669 if(l1_config.dwnld == DSP_DWNLD) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
670 // DSP CODE DOWNLOAD... |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
671 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
672 WORD32 load_result; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
673 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
674 #if (TRACE_TYPE==1) || (TRACE_TYPE==2) || (TRACE_TYPE==3) || (TRACE_TYPE == 7) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
675 #if (VOC == FR) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
676 L1_trace_string ("\n\r-> Downloading FR DSP code..."); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
677 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
678 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
679 #if (VOC == FR_HR) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
680 L1_trace_string ("\n\r-> Downloading FR&HR DSP code..."); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
681 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
682 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
683 #if (VOC == FR_EFR) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
684 L1_trace_string ("\n\r-> Downloading FR&EFR DSP code..."); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
685 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
686 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
687 #if (VOC == FR_HR_EFR) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
688 #if IDS |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
689 L1_trace_string ("\n\r-> Download FR&IDS DSP code..."); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
690 #else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
691 L1_trace_string ("\n\r-> Downloading 3VOC DSP code..."); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
692 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
693 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
694 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
695 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
696 // Download DSP code into DSP via API / bootcode. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
697 load_result = LA_LoadPage(DspCode_array,0,0); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
698 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
699 #if (TRACE_TYPE==1) || (TRACE_TYPE==2) || (TRACE_TYPE==3) || (TRACE_TYPE == 7) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
700 if(load_result) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
701 L1_trace_string ("\n\r-> Download FAILED !!"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
702 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
703 L1_trace_string ("\n\r-> ... finished !!"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
704 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
705 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
706 #if (VOC == FR_HR) || (VOC == FR_EFR) || (VOC == FR_HR_EFR) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
707 #if (TRACE_TYPE==1) || (TRACE_TYPE==2) || (TRACE_TYPE==3) || (TRACE_TYPE == 7) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
708 #if (VOC == FR_HR) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
709 L1_trace_string ("\n\r-> Downloading FR&HR DSP data ROM..."); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
710 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
711 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
712 #if (VOC == FR_EFR) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
713 L1_trace_string ("\n\r-> Downloading FR&EFR DSP data ROM..."); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
714 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
715 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
716 #if (VOC == FR_HR_EFR) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
717 #if IDS |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
718 L1_trace_string ("\n\r-> Download FR&IDS DSP Data ROM..."); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
719 #else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
720 L1_trace_string ("\n\r-> Downloading 3VOC DSP DATA ROM..."); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
721 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
722 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
723 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
724 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
725 load_result = LA_LoadPage(DspData_array,1,0); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
726 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
727 #if (TRACE_TYPE==1) || (TRACE_TYPE==2) || (TRACE_TYPE==3) || (TRACE_TYPE == 7) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
728 if(load_result) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
729 L1_trace_string ("\n\r-> Download FAILED !!"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
730 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
731 L1_trace_string ("\n\r-> ... finished !!"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
732 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
733 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
734 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
735 // Set DSP start address; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
736 dsp_start_address = DSP_START; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
737 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
738 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
739 if(l1_config.dwnld == PATCH_DWNLD) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
740 // DSP PATCH DOWNLOAD... |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
741 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
742 WORD32 load_result; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
743 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
744 #if (TRACE_TYPE==1) || (TRACE_TYPE==2) || (TRACE_TYPE==3) || (TRACE_TYPE == 7) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
745 L1_trace_string ("\n\r-> Downloading patch..."); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
746 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
747 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
748 // Download DSP patch into DSP via API / bootcode. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
749 load_result = LA_LoadPage(patch_array,0,0); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
750 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
751 #if (TRACE_TYPE==1) || (TRACE_TYPE==2) || (TRACE_TYPE==3) || (TRACE_TYPE == 7) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
752 if(load_result) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
753 L1_trace_string ("\n\r-> Download FAILED !!"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
754 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
755 L1_trace_string ("\n\r-> ... finished !!"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
756 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
757 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
758 // Catch start address always from patch_file#.c. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
759 dsp_start_address = (WORD16)patch_array[3]; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
760 dsp_start_address <<= 8; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
761 dsp_start_address += (WORD16)patch_array[2]; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
762 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
763 // if COFF2CP output, the file begins by a null tag |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
764 if(dsp_start_address == 0) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
765 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
766 dsp_start_address = (WORD16)patch_array[13]; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
767 dsp_start_address <<= 8; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
768 dsp_start_address += (WORD16)patch_array[12]; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
769 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
770 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
771 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
772 if(l1_config.dwnld == PATCH_DSP_DWNLD) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
773 // DSP CODE DOWNLOAD + PATCH DOWNLOAD... |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
774 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
775 WORD32 load_result; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
776 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
777 #if (TRACE_TYPE==1) || (TRACE_TYPE==2) || (TRACE_TYPE==3) || (TRACE_TYPE == 7) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
778 #if (VOC == FR) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
779 L1_trace_string ("\n\r-> Downloading FR DSP code..."); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
780 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
781 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
782 #if (VOC == FR_HR) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
783 L1_trace_string ("\n\r-> Downloading FR&HR DSP code..."); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
784 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
785 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
786 #if (VOC == FR_EFR) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
787 L1_trace_string ("\n\r-> Downloading FR&EFR DSP code..."); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
788 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
789 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
790 #if (VOC == FR_HR_EFR) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
791 #if IDS |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
792 L1_trace_string ("\n\r-> Download FR&IDS DSP code..."); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
793 #else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
794 L1_trace_string ("\n\r-> Downloading 3VOC DSP code..."); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
795 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
796 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
797 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
798 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
799 // Download DSP code into DSP via API / bootcode. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
800 load_result = LA_LoadPage(DspCode_array,0,0); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
801 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
802 #if (TRACE_TYPE==1) || (TRACE_TYPE==2) || (TRACE_TYPE==3) || (TRACE_TYPE == 7) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
803 if(load_result) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
804 L1_trace_string ("\n\r-> Download FAILED !!"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
805 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
806 L1_trace_string ("\n\r-> ... finished !!"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
807 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
808 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
809 #if (TRACE_TYPE==1) || (TRACE_TYPE==2) || (TRACE_TYPE==3) || (TRACE_TYPE == 7) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
810 L1_trace_string ("\n\r-> Downloading patch..."); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
811 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
812 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
813 // Download DSP patch into DSP via API / bootcode. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
814 load_result = LA_LoadPage(patch_array,0,0); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
815 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
816 #if (TRACE_TYPE==1) || (TRACE_TYPE==2) || (TRACE_TYPE==3) || (TRACE_TYPE == 7) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
817 if(load_result) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
818 L1_trace_string ("\n\r-> Download FAILED !!"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
819 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
820 L1_trace_string ("\n\r-> ... finished !!"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
821 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
822 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
823 #if ((VOC == FR_HR) || (VOC == FR_EFR) || (VOC == FR_HR_EFR)) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
824 #if (TRACE_TYPE==1) || (TRACE_TYPE==2) || (TRACE_TYPE==3) || (TRACE_TYPE == 7) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
825 #if (VOC == FR_HR) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
826 L1_trace_string ("\n\r-> Downloading FR&HR DSP data ROM..."); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
827 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
828 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
829 #if (VOC == FR_EFR) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
830 L1_trace_string ("\n\r-> Downloading FR&EFR DSP data ROM..."); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
831 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
832 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
833 #if (VOC == FR_HR_EFR) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
834 #if IDS |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
835 L1_trace_string ("\n\r-> Download FR&IDS DSP data ROM..."); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
836 #else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
837 L1_trace_string ("\n\r-> Downloading 3VOC DSP data ROM..."); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
838 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
839 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
840 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
841 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
842 load_result = LA_LoadPage(DspData_array,1,0); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
843 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
844 #if (TRACE_TYPE==1) || (TRACE_TYPE==2) || (TRACE_TYPE==3) || (TRACE_TYPE == 7) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
845 if(load_result) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
846 L1_trace_string ("\n\r-> Download FAILED !!"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
847 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
848 L1_trace_string ("\n\r-> ... finished !!"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
849 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
850 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
851 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
852 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
853 // Catch start address always from patch_file#.c. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
854 dsp_start_address = (WORD16)patch_array[3]; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
855 dsp_start_address <<= 8; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
856 dsp_start_address += (WORD16)patch_array[2]; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
857 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
858 // if COFF2CP output, the file begins by a null tag |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
859 if(dsp_start_address == 0) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
860 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
861 dsp_start_address = (WORD16)patch_array[13]; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
862 dsp_start_address <<= 8; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
863 dsp_start_address += (WORD16)patch_array[12]; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
864 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
865 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
866 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
867 #if (DSP == 16 || DSP == 17 || DSP == 30 || DSP == 31 || DSP == 32) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
868 dsp_ndb_ptr->d_pll_clkmod1 = CLKMOD1; // PLL variable (multiply by 3 factor)+ Power consumpt. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
869 dsp_ndb_ptr->d_pll_clkmod2 = CLKMOD2; // PLL variable (40 us lock time) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
870 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
871 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
872 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
873 #if (TRACE_TYPE==1) || (TRACE_TYPE==2) || (TRACE_TYPE==3) || (TRACE_TYPE==7) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
874 L1_trace_string ("\n\r\n\r"); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
875 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
876 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
877 //-------------------------------------------------------------- |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
878 // Loading of NDB parameters....... |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
879 //-------------------------------------------------------------- |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
880 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
881 #if (DSP == 33) || (DSP == 34) || (DSP == 35) || (DSP == 36) || (DSP == 37) || (DSP == 38) || (DSP == 39) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
882 // Initialize background control variable to No background. Background tasks can be launch in GPRS |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
883 // as in GSM. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
884 dsp_ndb_ptr->d_background_enable = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
885 dsp_ndb_ptr->d_background_abort = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
886 dsp_ndb_ptr->d_background_state = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
887 dsp_ndb_ptr->d_debug_ptr = 0x0074; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
888 dsp_ndb_ptr->d_debug_bk = 0x0001; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
889 dsp_ndb_ptr->d_pll_config = C_PLL_CONFIG; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
890 dsp_ndb_ptr->p_debug_buffer = C_DEBUG_BUFFER_ADD; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
891 dsp_ndb_ptr->d_debug_buffer_size = C_DEBUG_BUFFER_SIZE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
892 dsp_ndb_ptr->d_debug_trace_type = C_DEBUG_TRACE_TYPE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
893 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
894 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
895 #if (CHIPSET == 12) || (CHIPSET == 15) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
896 dsp_ndb_ptr->d_swh_flag_ndb = 0; /* interpolation off for non SAIC build*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
897 dsp_ndb_ptr->d_swh_Clipping_Threshold_ndb = 0x0000; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
898 #if (DSP == 36) || (DSP == 37) || (DSP == 39) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
899 #if (L1_SAIC != 0) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
900 dsp_ndb_ptr->d_swh_flag_ndb = SAIC_INITIAL_VALUE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
901 dsp_ndb_ptr->d_swh_Clipping_Threshold_ndb = 0x4000; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
902 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
903 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
904 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
905 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
906 #if (W_A_DSP_IDLE3 == 1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
907 // Deep Sleep work around used on Calypso |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
908 // This init is used to backward compatibility with old patch. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
909 dsp_ndb_ptr->d_dsp_state = C_DSP_IDLE3; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
910 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
911 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
912 dsp_ndb_ptr->d_audio_gain_ul = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
913 dsp_ndb_ptr->d_audio_gain_dl = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
914 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
915 // for patch >= 2100, use new AEC |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
916 #if (!L1_NEW_AEC) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
917 dsp_ndb_ptr->d_es_level_api = 0x5213; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
918 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
919 dsp_ndb_ptr->d_mu_api = 0x5000; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
920 #else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
921 #if L1_GPRS |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
922 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
923 T_NDB_MCU_DSP_GPRS *p_ndb_gprs = (T_NDB_MCU_DSP_GPRS *) NDB_ADR_GPRS; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
924 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
925 // Initialize background control variable to No background. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
926 p_ndb_gprs->d_background_enable = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
927 p_ndb_gprs->d_background_abort = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
928 p_ndb_gprs->d_background_state = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
929 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
930 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
931 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
932 #if (AMR == 1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
933 // Reset NDB pointer for AMR trace |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
934 dsp_ndb_ptr->p_debug_amr = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
935 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
936 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
937 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
938 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
939 //-------------------------------------------------------------- |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
940 // Loading of PARAM area....... |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
941 //-------------------------------------------------------------- |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
942 // Load PARAM memory... |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
943 pt = (API *) PARAM_ADR; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
944 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
945 for (i=0; i<param_size; i++) *pt++ = param_tab[i]; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
946 #if (DSP < 33) && (IDS) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
947 pt += 3; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
948 for (i= param_size + 3; i<param_size + 3 + param_size2; i++) *pt++ = param_tab[i]; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
949 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
950 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
951 #if (DSP == 33) || (DSP == 34) || (DSP == 35) || (DSP == 36) || (DSP == 37) || (DSP == 38) || (DSP == 39) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
952 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
953 T_PARAM_MCU_DSP *pt_param = (T_PARAM_MCU_DSP *) PARAM_ADR; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
954 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
955 // "d_gprs_install_address" has to be set only if no PATCH is download, i.e. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
956 // "d_gprs_install_address" is automatically set by DSP if a PATCH is download |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
957 if ((l1_config.dwnld == DSP_DWNLD) || (l1_config.dwnld == NO_DWNLD)) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
958 pt_param->d_gprs_install_address = INSTALL_ADD; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
959 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
960 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
961 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
962 #if L1_GPRS |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
963 //-------------------------------------------------------------- |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
964 // Loading of GPRS PARAM area....... |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
965 //-------------------------------------------------------------- |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
966 // Load GPRS PARAM memory... |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
967 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
968 T_PARAM_MCU_DSP_GPRS *pt_gprs = (T_PARAM_MCU_DSP_GPRS *) PARAM_ADR_GPRS; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
969 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
970 // WARNING: must be configured according to the ARM & DSP clock speed. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
971 // The following values are required with a 13MHz ARM clock and with a 65 MIPS DSP. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
972 pt_gprs->d_overlay_rlcmac_cfg_gprs = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
973 pt_gprs->d_mac_threshold = 0x4e20; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
974 pt_gprs->d_sd_threshold = 0x0016; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
975 pt_gprs->d_nb_max_iteration = 0x0004; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
976 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
977 #if (DSP != 33) && (DSP != 34) && (DSP != 35) && (DSP != 36) && (DSP != 37) && (DSP != 38) && (DSP != 39) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
978 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
979 #if (OP_L1_STANDALONE) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
980 #if (CHIPSET == 4) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || \ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
981 (CHIPSET == 11) || (CHIPSET == 12) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
982 pt_gprs->d_lat_mcu_bridge = p_dynamic_clock_cfg->d_lat_mcu_bridge; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
983 pt_gprs->d_lat_mcu_hom2sam = p_dynamic_clock_cfg->d_lat_mcu_hom2sam; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
984 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
985 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
986 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
987 #if (CHIPSET == 4) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
988 #if (!OP_L1_STANDALONE) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
989 // Latency for DSP at 78 MIPS |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
990 pt_gprs->d_lat_mcu_bridge = 0x0009; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
991 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
992 pt_gprs->d_lat_pll2div = 0x000C; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
993 #if (!OP_L1_STANDALONE) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
994 pt_gprs->d_lat_mcu_hom2sam = 0x000C; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
995 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
996 #else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
997 #if (!OP_L1_STANDALONE) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
998 pt_gprs->d_lat_mcu_bridge = 0x0008; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
999 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1000 pt_gprs->d_lat_pll2div = 0x000A; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1001 #if (!OP_L1_STANDALONE) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1002 pt_gprs->d_lat_mcu_hom2sam = 0x000A; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1003 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1004 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1005 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1006 // To be removed once G0 patch process will be aligned with G1 & G2 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1007 // i.e. "d_gprs_install_address" automatically set by DSP if a Patch is present. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1008 #if (DSP == 31) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1009 if ((l1_config.dwnld == PATCH_DSP_DWNLD) || |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1010 (l1_config.dwnld == PATCH_DWNLD)) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1011 pt_gprs->d_gprs_install_address = INSTALL_ADD_WITH_PATCH; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1012 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1013 pt_gprs->d_gprs_install_address = INSTALL_ADD; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1014 #else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1015 if ((l1_config.dwnld == DSP_DWNLD) || (l1_config.dwnld == NO_DWNLD)) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1016 pt_gprs->d_gprs_install_address = INSTALL_ADD; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1017 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1018 #endif // DSP != 33 && DSP != 34 && (DSP != 35) && DSP != 36 && DSP != 37 && DSP != 38 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1019 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1020 #endif // L1_GPRS |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1021 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1022 *(volatile UWORD16 *) DOWNLOAD_SIZE = 0; // Size=0 to force DSP to start from address... |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1023 *(volatile UWORD16 *) DOWNLOAD_ADDR = dsp_start_address; // Start address. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1024 *(volatile UWORD16 *) DOWNLOAD_STATUS = BLOCK_READY; // Start DSP... |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1025 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1026 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1027 #endif //#if CODE_VERSION!=SIMULATION |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1028 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1029 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1030 /* l1s_reset_db_mcu_to_dsp() */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1031 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1032 /* Parameters : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1033 /* Return : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1034 /* Functionality : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1035 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1036 void l1s_reset_db_mcu_to_dsp(T_DB_MCU_TO_DSP *page_ptr) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1037 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1038 API i; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1039 API size = sizeof(T_DB_MCU_TO_DSP) / sizeof(API); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1040 API *ptr = (API *)page_ptr; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1041 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1042 // Clear all locations. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1043 for(i=0; i<size; i++) *ptr++ = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1044 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1045 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1046 #if (DSP == 38) || (DSP == 39) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1047 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1048 /* l1s_reset_db_common_mcu_to_dsp() */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1049 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1050 /* Parameters : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1051 /* Return : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1052 /* Functionality : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1053 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1054 void l1s_reset_db_common_mcu_to_dsp(T_DB_COMMON_MCU_TO_DSP *page_ptr) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1055 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1056 API i; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1057 API size = sizeof(T_DB_COMMON_MCU_TO_DSP) / sizeof(API); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1058 API *ptr = (API *)page_ptr; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1059 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1060 // Clear all locations. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1061 for(i=0; i<size; i++) *ptr++ = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1062 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1063 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1064 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1065 /* l1s_reset_db_dsp_to_mcu() */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1066 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1067 /* Parameters : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1068 /* Return : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1069 /* Functionality : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1070 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1071 void l1s_reset_db_dsp_to_mcu(T_DB_DSP_TO_MCU *page_ptr) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1072 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1073 API i; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1074 API size = sizeof(T_DB_DSP_TO_MCU) / sizeof(API); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1075 API *ptr = (API *)page_ptr; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1076 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1077 // Clear all locations. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1078 for(i=0; i<size; i++) *ptr++ = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1079 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1080 // Set crc result as "SB not found". |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1081 page_ptr->a_sch[0] = (1<<B_SCH_CRC); // B_SCH_CRC =1, BLUD =0 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1082 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1083 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1084 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1085 /* l1s_increment_time() */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1086 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1087 /* Parameters : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1088 /* Return : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1089 /* Functionality : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1090 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1091 void l1s_increment_time(T_TIME_INFO *time, UWORD32 fn_offset) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1092 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1093 // Increment FN % MAX_FN. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1094 //------------------------ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1095 IncMod(time->fn, fn_offset, MAX_FN); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1096 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1097 if(fn_offset == 1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1098 // Frame by frame increment... |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1099 //---------------------------- |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1100 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1101 IncMod(time->t2, 1, 26); // increment T2 % 26. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1102 IncMod(time->t3, 1, 51); // increment T3 % 51. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1103 IncMod(time->fn_mod42432, 1, 42432); // increment FN % 42432. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1104 IncMod(time->fn_mod13, 1, 13); // increment FN % 13. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1105 IncMod(time->fn_mod13_mod4, 1, 4); // increment (FN % 13) % 4. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1106 if(time->fn_mod13 == 0) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1107 time->fn_mod13_mod4 = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1108 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1109 if(time->t3 == 0) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1110 // new FN is a multiple of 51. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1111 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1112 // Increment TC ((FN/51) % 8). |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1113 IncMod(time->tc, 1, 8); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1114 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1115 // New FN is a multiple of 26 and 51 -> increment T1 % 2048 (T1=FN div (26*51)). |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1116 if(time->t2 == 0) IncMod(time->t1, 1, 2048); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1117 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1118 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1119 #if (L1_GPRS) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1120 IncMod(time->fn_mod52, 1, 52); // increment FN % 52. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1121 IncMod(time->fn_mod104, 1, 104); // increment FN % 104. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1122 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1123 if((time->fn_mod13 == 0) || (time->fn_mod13 == 4) || (time->fn_mod13 == 8)) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1124 IncMod(time->block_id, 1, MAX_BLOCK_ID); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1125 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1126 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1127 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1128 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1129 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1130 // Jumping on a new serving cell. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1131 //------------------------------- |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1132 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1133 time->t2 = time->fn % 26; // T2 = FN % 26. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1134 time->t3 = time->fn % 51; // T3 = FN % 51. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1135 time->t1 = time->fn / (26L*51L); // T1 = FN div 26*51 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1136 time->tc = (time->fn / 51) % 8; // TC = (FN div 51) % 8 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1137 time->fn_mod42432 = time->fn % 42432; // FN%42432. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1138 time->fn_mod13 = time->fn % 13; // FN % 13. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1139 time->fn_mod13_mod4 = time->fn_mod13 % 4; // FN % 13 % 4. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1140 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1141 #if (L1_GPRS) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1142 time->fn_mod104 = time->fn % 104; // FN % 104. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1143 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1144 if(time->fn_mod104 >= 52) // FN % 52. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1145 time->fn_mod52 = time->fn_mod104 - 52; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1146 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1147 time->fn_mod52 = time->fn_mod104; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1148 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1149 time->block_id = ((3 * (time->fn / 13)) + (time->fn_mod13 / 4)); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1150 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1151 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1152 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1153 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1154 // Computes reporting period frame number according to the current FN |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1155 if(l1a_l1s_com.l1s_en_task[DEDIC] == TASK_ENABLED) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1156 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1157 T_CHANNEL_DESCRIPTION *desc_ptr; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1158 UWORD8 timeslot_no; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1159 UWORD8 subchannel; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1160 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1161 // Get a meaningfull channel description. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1162 //--------------------------------------- |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1163 // Rem1: this is to avoid a bad setting of "fn_in_report" when synchro is performed |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1164 // whereas L1 is waiting for starting time and no channel discribed BEFORE STI. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1165 // Rem2: "fn_in_report" is computed with "CHAN1" parameters since it is the channel |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1166 // which carries the SACCH. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1167 if(l1a_l1s_com.dedic_set.aset->chan1.desc_ptr->channel_type == INVALID_CHANNEL) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1168 desc_ptr = &l1a_l1s_com.dedic_set.aset->chan1.desc; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1169 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1170 desc_ptr = l1a_l1s_com.dedic_set.aset->chan1.desc_ptr; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1171 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1172 timeslot_no = desc_ptr->timeslot_no; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1173 subchannel = desc_ptr->subchannel; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1174 if(desc_ptr->channel_type == TCH_H) timeslot_no = (2*(timeslot_no/2) + subchannel); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1175 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1176 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1177 // Compute "fn_in_report" according to the channel_type. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1178 //------------------------------------------------------ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1179 if(desc_ptr->channel_type == SDCCH_4) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1180 // FN_REPORT for SDCCH/4 is: fn%102 in [37..36]. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1181 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1182 l1s.actual_time.fn_in_report = (UWORD8)((l1s.actual_time.fn - 37 + 102) % 102); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1183 l1s.next_time.fn_in_report = (UWORD8)((l1s.next_time.fn - 37 + 102) % 102); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1184 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1185 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1186 if(desc_ptr->channel_type == SDCCH_8) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1187 // FN_REPORT for SDCCH/4 is: fn%102 in [12..11]. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1188 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1189 l1s.actual_time.fn_in_report = (UWORD8)((l1s.actual_time.fn - 12 + 102) % 102); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1190 l1s.next_time.fn_in_report = (UWORD8)((l1s.next_time.fn - 12 + 102) % 102); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1191 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1192 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1193 // TCH_F or TCH_H... |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1194 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1195 // 1) (timeslot_no * 13) is computed in order to substract the considered beginning for this |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1196 // timeslot and then always be in the range 0..103 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1197 // 2) 104 is added in order to cope with negative numbers. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1198 l1s.actual_time.fn_in_report = (UWORD8)((l1s.actual_time.fn - (timeslot_no * 13) + 104) % 104); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1199 l1s.next_time.fn_in_report = (UWORD8)((l1s.next_time.fn - (timeslot_no * 13) + 104) % 104); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1200 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1201 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1202 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1203 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1204 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1205 /* l1s_encode_rxlev() */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1206 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1207 /* Parameters : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1208 /* Return : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1209 /* Functionality : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1210 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1211 WORD16 l1s_encode_rxlev(UWORD8 inlevel) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1212 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1213 WORD16 rxlev; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1214 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1215 rxlev = (221 - inlevel) / 2; // the result is divided by 2 due to |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1216 // the IL format is 7.1 and rxlev format is 8.0 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1217 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1218 return(rxlev); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1219 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1220 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1221 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1222 /* l1s_send_ho_finished() */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1223 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1224 /* Parameters : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1225 /* Return : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1226 /* Functionality : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1227 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1228 void l1s_send_ho_finished(UWORD8 cause) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1229 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1230 xSignalHeaderRec *msg; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1231 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1232 msg = os_alloc_sig(sizeof(T_MPHC_HANDOVER_FINISHED)); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1233 DEBUGMSG(status,NU_ALLOC_ERR) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1234 msg->SignalCode = L1C_HANDOVER_FINISHED; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1235 ((T_MPHC_HANDOVER_FINISHED *)(msg->SigP))->cause = cause; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1236 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1237 os_send_sig(msg, L1C1_QUEUE); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1238 DEBUGMSG(status,NU_SEND_QUEUE_ERR) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1239 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1240 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1241 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1242 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1243 /* l1s_get_versions() */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1244 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1245 /* Parameters : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1246 /* Return : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1247 /* Functionality : return address of version structur */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1248 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1249 T_VERSION *l1s_get_version (void) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1250 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1251 //update the fields not initialized by the sw init. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1252 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1253 #if (DSP == 33) || (DSP == 34) || (DSP == 35) || (DSP == 36) || (DSP == 37) || (DSP == 38) || (DSP == 39) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1254 l1s.version.dsp_code_version = l1s_dsp_com.dsp_ndb_ptr->d_version_number1; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1255 l1s.version.dsp_patch_version = l1s_dsp_com.dsp_ndb_ptr->d_version_number2; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1256 // Note: if l1s.version.dsp_checksum is not initialized (field set to 0) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1257 // use TST_TEST_HW_REQ message to initialize the whole structur. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1258 #else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1259 l1s.version.dsp_patch_version = l1s_dsp_com.dsp_param_ptr->d_version_number; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1260 // Note: if l1s.version.dsp_code_version and l1s.version.dsp_checksum |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1261 // are not initialized (fields set to 0) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1262 // use TST_TEST_HW_REQ message to initialize the whole structur. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1263 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1264 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1265 return (&l1s.version); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1266 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1267 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1268 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1269 /* l1s_reset_dedic_meas() */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1270 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1271 /* Parameters : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1272 /* Return : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1273 /* Functionality : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1274 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1275 void l1s_reset_dedic_serving_meas(void) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1276 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1277 // Reset rxlev related fields |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1278 l1a_l1s_com.Scell_info.meas.acc = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1279 l1a_l1s_com.Scell_info.meas.nbr_meas = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1280 l1a_l1s_com.Smeas_dedic.acc_sub = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1281 l1a_l1s_com.Smeas_dedic.nbr_meas_sub = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1282 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1283 // Reset rxqual related fields |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1284 l1a_l1s_com.Smeas_dedic.qual_acc_full = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1285 l1a_l1s_com.Smeas_dedic.qual_nbr_meas_full = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1286 l1a_l1s_com.Smeas_dedic.qual_acc_sub = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1287 l1a_l1s_com.Smeas_dedic.qual_nbr_meas_sub = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1288 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1289 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1290 #if REL99 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1291 #if FF_EMR |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1292 // Reset EMR variables |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1293 l1a_l1s_com.Smeas_dedic_emr.rxlev_val_acc = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1294 l1a_l1s_com.Smeas_dedic_emr.rxlev_val_nbr_meas = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1295 l1a_l1s_com.Smeas_dedic_emr.nbr_rcvd_blocks = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1296 l1a_l1s_com.Smeas_dedic_emr.mean_bep_block_acc = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1297 l1a_l1s_com.Smeas_dedic_emr.cv_bep_block_acc = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1298 l1a_l1s_com.Smeas_dedic_emr.mean_bep_block_num = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1299 l1a_l1s_com.Smeas_dedic_emr.cv_bep_block_num = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1300 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1301 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1302 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1303 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1304 // Reset dtx frame counter |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1305 l1a_l1s_com.Smeas_dedic.dtx_used = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1306 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1307 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1308 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1309 /* SwapIQ_dl() */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1310 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1311 /* Parameters : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1312 /* Return : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1313 /* Functionality : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1314 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1315 UWORD32 l1s_swap_iq_dl(UWORD16 radio_freq, UWORD8 task) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1316 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1317 UWORD8 swap_iq; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1318 UWORD32 task_tab= 0; //omaps00090550 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1319 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1320 #if (L1_FF_MULTIBAND == 0) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1321 if(((l1_config.std.id == DUAL) || (l1_config.std.id == DUALEXT) || (l1_config.std.id == DUAL_US)) && |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1322 (radio_freq >= l1_config.std.first_radio_freq_band2)) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1323 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1324 swap_iq = l1_config.std.swap_iq_band2; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1325 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1326 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1327 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1328 swap_iq = l1_config.std.swap_iq_band1; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1329 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1330 #else // L1_FF_MULTIBAND = 1 below |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1331 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1332 UWORD16 physical_band_id; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1333 physical_band_id = |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1334 l1_multiband_radio_freq_convert_into_physical_band_id(radio_freq); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1335 swap_iq = rf_band[physical_band_id].swap_iq; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1336 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1337 #endif // #if (L1_FF_MULTIBAND == 0) else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1338 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1339 switch(swap_iq) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1340 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1341 case 0: /* No swap at all. */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1342 case 2: /* DL, no swap. */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1343 task_tab = (UWORD32)DSP_TASK_CODE[task]; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1344 break; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1345 case 1: /* DL I/Q swap. */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1346 case 3: /* DL I/Q swap. */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1347 task_tab = (UWORD32)DSP_TASK_CODE[task]; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1348 task_tab |= 0x8000L; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1349 break; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1350 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1351 return(task_tab); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1352 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1353 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1354 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1355 /* l1s_swap_iq_ul() */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1356 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1357 /* Parameters : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1358 /* Return : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1359 /* Functionality : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1360 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1361 UWORD32 l1s_swap_iq_ul(UWORD16 radio_freq, UWORD8 task) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1362 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1363 UWORD8 swap_iq; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1364 UWORD32 task_tab = 0; //omaps00090550 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1365 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1366 #if (L1_FF_MULTIBAND == 0) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1367 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1368 if(((l1_config.std.id == DUAL) || (l1_config.std.id == DUALEXT) || (l1_config.std.id == DUAL_US)) && |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1369 (radio_freq >= l1_config.std.first_radio_freq_band2)) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1370 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1371 swap_iq = l1_config.std.swap_iq_band2; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1372 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1373 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1374 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1375 swap_iq = l1_config.std.swap_iq_band1; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1376 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1377 #else // L1_FF_MULTIBAND = 1 below |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1378 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1379 UWORD16 physical_band_id = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1380 physical_band_id = |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1381 l1_multiband_radio_freq_convert_into_physical_band_id(radio_freq); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1382 swap_iq = rf_band[physical_band_id].swap_iq; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1383 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1384 #endif // #if (L1_FF_MULTIBAND == 0) else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1385 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1386 switch(swap_iq) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1387 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1388 case 0: /* No swap at all. */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1389 case 1: /* UL, no swap. */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1390 task_tab = (UWORD32)DSP_TASK_CODE[task]; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1391 break; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1392 case 2: /* UL I/Q swap. */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1393 case 3: /* UL I/Q swap. */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1394 task_tab = (UWORD32)DSP_TASK_CODE[task]; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1395 task_tab |= 0x8000L; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1396 break; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1397 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1398 return(task_tab); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1399 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1400 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1401 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1402 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1403 /* l1s_ADC_decision_on_NP() */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1404 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1405 /* Parameters : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1406 /* Return : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1407 /* Functionality : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1408 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1409 UWORD8 l1s_ADC_decision_on_NP(void) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1410 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1411 UWORD8 adc_active = INACTIVE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1412 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1413 if (l1a_l1s_com.l1s_en_task[ALLC] == TASK_DISABLED) // no reorg mode |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1414 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1415 if (l1a_l1s_com.adc_mode & ADC_NEXT_NORM_PAGING) // perform ADC only one time |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1416 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1417 adc_active = ACTIVE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1418 l1a_l1s_com.adc_mode &= ADC_MASK_RESET_IDLE; // reset in order to have only one ADC measurement in Idle |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1419 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1420 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1421 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1422 if (l1a_l1s_com.adc_mode & ADC_EACH_NORM_PAGING) // perform ADC on each "period" x bloc |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1423 if ((++l1a_l1s_com.adc_cpt)>=l1a_l1s_com.adc_idle_period) // wait for the period |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1424 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1425 adc_active = ACTIVE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1426 l1a_l1s_com.adc_cpt = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1427 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1428 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1429 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1430 else // ADC measurement in reorg mode |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1431 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1432 if (l1a_l1s_com.adc_mode & ADC_NEXT_NORM_PAGING_REORG) // perform ADC only one time |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1433 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1434 adc_active = ACTIVE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1435 l1a_l1s_com.adc_mode &= ADC_MASK_RESET_IDLE; // reset in order to have only one ADC measurement in Idle |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1436 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1437 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1438 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1439 if (l1a_l1s_com.adc_mode & ADC_EACH_NORM_PAGING_REORG) // perform ADC on each "period" x bloc |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1440 if ((++l1a_l1s_com.adc_cpt)>=l1a_l1s_com.adc_idle_period) // wait for the period |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1441 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1442 adc_active = ACTIVE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1443 l1a_l1s_com.adc_cpt = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1444 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1445 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1446 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1447 return(adc_active); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1448 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1449 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1450 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1451 #if (AMR == 1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1452 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1453 /* l1s_amr_get_ratscch_type() */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1454 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1455 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1456 /* Description: */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1457 /* ------------ */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1458 /* This function returns the type of a RATSCCH block */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1459 /* Decoding is done according to ETSI spec 05.09 */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1460 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1461 /* Input parameter: */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1462 /* --------------- */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1463 /* "a_ratscch" */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1464 /* pointer to the RATSCCH block */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1465 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1466 /* Output parameter: */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1467 /* ---------------- */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1468 /* Type of RATSCCH block. */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1469 /* Can be: C_RATSCCH_UNKNOWN */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1470 /* C_RATSCCH_CMI_PHASE_REQ */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1471 /* C_RATSCCH_AMR_CONFIG_REQ_MAIN */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1472 /* C_RATSCCH_AMR_CONFIG_REQ_ALT */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1473 /* C_RATSCCH_AMR_CONFIG_REQ_ALT_IGNORE */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1474 /* C_RATSCCH_THRES_REQ */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1475 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1476 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1477 UWORD8 l1s_amr_get_ratscch_type(API *a_ratscch) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1478 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1479 // Check if the RATSCCH block is a CMI_PHASE_REQ block |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1480 // -> if and only if bits 1, 3 through 34 are cleared and bit 2 is set |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1481 if(((UWORD16)(a_ratscch[3] & 0xFFFE) == 0x0004) && // bits 1, 3-15 are cleared, bit 2 is set |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1482 ((UWORD16)(a_ratscch[4]) == 0x0000) && // bits 16-31 are cleared |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1483 ((UWORD16)(a_ratscch[5] & 0x0007) == 0x0000)) // bits 32-34 are cleared |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1484 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1485 return C_RATSCCH_CMI_PHASE_REQ; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1486 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1487 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1488 // Check if the RATSCCH block is a THRES_REQ block |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1489 // -> if and only if bits 31 through 34 are cleared and bit 30 is set |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1490 if(((UWORD16)(a_ratscch[4] & 0xC000) == 0x4000) && // bit 30 is set, bit 31 is cleared |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1491 ((UWORD16)(a_ratscch[5] & 0x0007) == 0x0000)) // bits 32-34 are cleared |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1492 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1493 return C_RATSCCH_THRES_REQ; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1494 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1495 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1496 // Check if the RATSCCH block is a AMR_CONFIG_REQ block |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1497 // -> if and only if bits 33-34 are cleared and bits 30-32 are set |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1498 if(((UWORD16)(a_ratscch[4] & 0xC000) == 0xC000) && // bits 30-31 are set |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1499 ((UWORD16)(a_ratscch[5] & 0x0007) == 0x0001)) // bit 32 is set, bits 33-34 are cleared |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1500 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1501 // Check if it's a main AMR_CONFIG_REQ block or an alternative AMR_CONFIG_REQ block |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1502 UWORD16 ratscch_acs = (a_ratscch[4] & 0x0FF0) >> 4; // get bits 20-27 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1503 UWORD8 nb_coders,i; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1504 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1505 // Count number of active coders |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1506 for(i=0, nb_coders=0; i<8; i++) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1507 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1508 if((ratscch_acs & 1)==1) nb_coders++; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1509 ratscch_acs >>= 1; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1510 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1511 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1512 // If the number of coders is 1, 2 or 3, it is a main AMR_CONFIG_REQ block |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1513 if(nb_coders<=3) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1514 return C_RATSCCH_AMR_CONFIG_REQ_MAIN; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1515 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1516 // If the number of coders is more than 4, it is an alternate AMR_CONFIG_REQ block |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1517 // Check if it must be ignored (block THRES_REQ pending) or not |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1518 // -> if and only if bits 0 through 19 are set |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1519 if(((UWORD16)(a_ratscch[3]) == 0xFFFF) && // bits 0-15 are set |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1520 ((UWORD16)(a_ratscch[4] & 0x000F) == 0x000F)) // bits 16-19 are set |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1521 return C_RATSCCH_AMR_CONFIG_REQ_ALT_IGNORE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1522 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1523 return C_RATSCCH_AMR_CONFIG_REQ_ALT; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1524 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1525 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1526 // Block is not recognized |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1527 return C_RATSCCH_UNKNOWN; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1528 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1529 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1530 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1531 /*--------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1532 /* l1s_amr_update_from_ratscch() */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1533 /*--------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1534 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1535 /* Description: */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1536 /* ------------ */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1537 /* This function updates the AMR parameters modified by */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1538 /* the RATSCCH block received. This updates is done both */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1539 /* in the NDB and in the L1A/L1S communication structure */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1540 /* (aset pointer). */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1541 /* Data manipulation is done according to ETSI spec 05.08 */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1542 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1543 /* Input parameter: */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1544 /* --------------- */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1545 /* "a_ratscch_dl" */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1546 /* pointer to the RATSCCH block */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1547 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1548 /* Output parameter: */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1549 /* ---------------- */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1550 /* n/a */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1551 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1552 /*--------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1553 void l1s_amr_update_from_ratscch(API *a_ratscch_dl) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1554 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1555 UWORD16 acs,hysteresis1,hysteresis2,hysteresis3,threshold1,threshold2,threshold3,icm,cmip; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1556 UWORD16 amr_change_bitmap=0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1557 UWORD8 ratscch_type; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1558 BOOL ratscch_unknown=TRUE; // No AMR parameters update |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1559 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1560 // Get the RATSCCH block's type |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1561 ratscch_type = l1s_amr_get_ratscch_type(a_ratscch_dl); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1562 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1563 // Check the RATSCCH block's type |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1564 switch(ratscch_type) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1565 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1566 case C_RATSCCH_CMI_PHASE_REQ: |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1567 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1568 // Copy CMIP to L1 structure |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1569 cmip = a_ratscch_dl[3] & 0x0001; // bit 0 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1570 l1a_l1s_com.dedic_set.aset->cmip=(UWORD8)cmip; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1571 amr_change_bitmap |= 1 << C_AMR_CHANGE_CMIP; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1572 // AMR parameters update flag |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1573 ratscch_unknown=FALSE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1574 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1575 break; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1576 case C_RATSCCH_AMR_CONFIG_REQ_MAIN: |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1577 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1578 // Copy ACS to L1 structure |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1579 acs = (a_ratscch_dl[4] & 0x0FF0) >> 4; // bits 20-27 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1580 l1a_l1s_com.dedic_set.aset->amr_configuration.active_codec_set=(UWORD8)acs; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1581 amr_change_bitmap |= 1 << C_AMR_CHANGE_ACS; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1582 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1583 // Copy ICM to L1 structure |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1584 icm = (a_ratscch_dl[4] & 0x3000) >> 12; // bits 28-29 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1585 l1a_l1s_com.dedic_set.aset->amr_configuration.initial_codec_mode=(UWORD8)icm; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1586 amr_change_bitmap |= 1 << C_AMR_CHANGE_ICM; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1587 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1588 // Copy hysteresis 1 to L1 structure |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1589 hysteresis1 = (a_ratscch_dl[3] & 0x03C0) >> 6; // bits 6-9 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1590 l1a_l1s_com.dedic_set.aset->amr_configuration.hysteresis[0]=(UWORD8)hysteresis1; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1591 amr_change_bitmap |= 1 << C_AMR_CHANGE_HYST1; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1592 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1593 // Copy threshold 1 to L1 structure |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1594 threshold1 = a_ratscch_dl[3] & 0x003F; // bits 0-5 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1595 l1a_l1s_com.dedic_set.aset->amr_configuration.threshold[0]=(UWORD8)threshold1; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1596 amr_change_bitmap |= 1 << C_AMR_CHANGE_THR1; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1597 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1598 // Copy hysteresis 2 to L1 structure |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1599 hysteresis2 = a_ratscch_dl[4] & 0x000F; // bits 16-19 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1600 l1a_l1s_com.dedic_set.aset->amr_configuration.hysteresis[1]=(UWORD8)hysteresis2; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1601 amr_change_bitmap |= 1 << C_AMR_CHANGE_HYST2; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1602 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1603 // Copy threshold 2 to L1 structure |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1604 threshold2 = (a_ratscch_dl[3] & 0xFC00) >> 10; // bits 10-15 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1605 l1a_l1s_com.dedic_set.aset->amr_configuration.threshold[1]=(UWORD8)threshold2; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1606 amr_change_bitmap |= 1 << C_AMR_CHANGE_THR2; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1607 // AMR parameters update flag |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1608 ratscch_unknown=FALSE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1609 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1610 break; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1611 case C_RATSCCH_AMR_CONFIG_REQ_ALT: |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1612 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1613 // Copy ACS to L1 structure |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1614 acs = (a_ratscch_dl[4] & 0x0FF0) >> 4; // bits 20-27 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1615 l1a_l1s_com.dedic_set.aset->amr_configuration.active_codec_set=(UWORD8)acs; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1616 amr_change_bitmap |= 1 << C_AMR_CHANGE_ACS; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1617 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1618 // Copy ICM to L1 structure |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1619 icm = (a_ratscch_dl[4] & 0x3000) >> 12; // bits 28-29 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1620 l1a_l1s_com.dedic_set.aset->amr_configuration.initial_codec_mode=(UWORD8)icm; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1621 amr_change_bitmap |= 1 << C_AMR_CHANGE_ICM; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1622 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1623 // Copy threshold 1 to L1 structure |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1624 threshold1 = a_ratscch_dl[3] & 0x003F; // bits 0-5 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1625 l1a_l1s_com.dedic_set.aset->amr_configuration.threshold[0]=(UWORD8)threshold1; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1626 amr_change_bitmap |= 1 << C_AMR_CHANGE_THR1; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1627 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1628 // Copy threshold 2 to L1 structure |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1629 threshold2 = (a_ratscch_dl[3] & 0x0FC0) >> 6; // bits 6-11 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1630 l1a_l1s_com.dedic_set.aset->amr_configuration.threshold[1]=(UWORD8)threshold2; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1631 amr_change_bitmap |= 1 << C_AMR_CHANGE_THR2; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1632 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1633 // Copy threshold 3 to L1 structure |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1634 threshold3 = ((a_ratscch_dl[3] & 0xF000) >> 12) | // bits 12-15 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1635 ((a_ratscch_dl[4] & 0x0003) << 4); // bits 16-17 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1636 l1a_l1s_com.dedic_set.aset->amr_configuration.threshold[2]=(UWORD8)threshold3; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1637 amr_change_bitmap |= 1 << C_AMR_CHANGE_THR3; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1638 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1639 // Copy hysteresis 1, 2 and 3 (common hysteresis) to L1 structure |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1640 hysteresis1 = (a_ratscch_dl[4] & 0x000C) >> 2; // bits 18-19 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1641 hysteresis2 = hysteresis3 = hysteresis1; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1642 l1a_l1s_com.dedic_set.aset->amr_configuration.hysteresis[0]= |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1643 l1a_l1s_com.dedic_set.aset->amr_configuration.hysteresis[1]= |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1644 l1a_l1s_com.dedic_set.aset->amr_configuration.hysteresis[2]=(UWORD8)hysteresis1; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1645 amr_change_bitmap |= (1 << C_AMR_CHANGE_HYST1) | (1 << C_AMR_CHANGE_HYST2) | (1 << C_AMR_CHANGE_HYST3); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1646 // AMR parameters update flag |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1647 ratscch_unknown=FALSE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1648 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1649 break; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1650 case C_RATSCCH_AMR_CONFIG_REQ_ALT_IGNORE: |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1651 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1652 // Copy ACS to L1 structure |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1653 acs = (a_ratscch_dl[4] & 0x0FF0) >> 4; // bits 20-27 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1654 l1a_l1s_com.dedic_set.aset->amr_configuration.active_codec_set=(UWORD8)acs; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1655 amr_change_bitmap |= 1 << C_AMR_CHANGE_ACS; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1656 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1657 // Copy ICM to L1 structure |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1658 icm = (a_ratscch_dl[4] & 0x3000) >> 12; // bits 28-29 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1659 l1a_l1s_com.dedic_set.aset->amr_configuration.initial_codec_mode=(UWORD8)icm; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1660 amr_change_bitmap |= 1 << C_AMR_CHANGE_ICM; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1661 // AMR parameters update flag |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1662 ratscch_unknown=FALSE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1663 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1664 break; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1665 case C_RATSCCH_THRES_REQ: |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1666 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1667 // Copy hysteresis 1 to L1 structure |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1668 hysteresis1 = (a_ratscch_dl[3] & 0x03C0) >> 6; // bits 6-9 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1669 l1a_l1s_com.dedic_set.aset->amr_configuration.hysteresis[0]=(UWORD8)hysteresis1; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1670 amr_change_bitmap |= 1 << C_AMR_CHANGE_HYST1; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1671 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1672 // Copy threshold 1 to L1 structure |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1673 threshold1 = a_ratscch_dl[3] & 0x003F; // bits 0-5 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1674 l1a_l1s_com.dedic_set.aset->amr_configuration.threshold[0]=(UWORD8)threshold1; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1675 amr_change_bitmap |= 1 << C_AMR_CHANGE_THR1; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1676 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1677 // Copy hysteresis 2 to L1 structure |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1678 hysteresis2 = a_ratscch_dl[4] & 0x000F; // bits 16-19 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1679 l1a_l1s_com.dedic_set.aset->amr_configuration.hysteresis[1]=(UWORD8)hysteresis2; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1680 amr_change_bitmap |= 1 << C_AMR_CHANGE_HYST2; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1681 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1682 // Copy threshold 2 to L1 structure |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1683 threshold2 = (a_ratscch_dl[3] & 0xFC00) >> 10; // bits 10-15 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1684 l1a_l1s_com.dedic_set.aset->amr_configuration.threshold[1]=(UWORD8)threshold2; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1685 amr_change_bitmap |= 1 << C_AMR_CHANGE_THR2; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1686 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1687 // Copy hysteresis 3 to L1 structure |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1688 hysteresis3 = (a_ratscch_dl[4] & 0x3C00) >> 10; // bits 26-29 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1689 l1a_l1s_com.dedic_set.aset->amr_configuration.hysteresis[2]=(UWORD8)hysteresis3; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1690 amr_change_bitmap |= 1 << C_AMR_CHANGE_HYST3; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1691 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1692 // Copy threshold 3 to L1 structure |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1693 threshold3 = (a_ratscch_dl[4] & 0x03F0) >> 4; // bits 20-25 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1694 l1a_l1s_com.dedic_set.aset->amr_configuration.threshold[2]=(UWORD8)threshold3; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1695 amr_change_bitmap |= 1 << C_AMR_CHANGE_THR3; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1696 // AMR parameters update flag |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1697 ratscch_unknown=FALSE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1698 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1699 break; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1700 case C_RATSCCH_UNKNOWN: |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1701 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1702 // No AMR parameters update |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1703 ratscch_unknown=TRUE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1704 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1705 break; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1706 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1707 // AMR parameters update only if valid RATSCCH |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1708 if(ratscch_unknown==FALSE) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1709 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1710 // Update NDB with new AMR parameters |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1711 l1ddsp_load_amr_param(l1a_l1s_com.dedic_set.aset->amr_configuration,l1a_l1s_com.dedic_set.aset->cmip); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1712 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1713 #if (TRACE_TYPE == 1) || (TRACE_TYPE == 4) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1714 l1_trace_ratscch(l1s.actual_time.fn_mod42432,amr_change_bitmap); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1715 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1716 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1717 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1718 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1719 #endif // AMR |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1720 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1721 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1722 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1723 /*--------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1724 /* l1_memcpy_16bit() */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1725 /*--------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1726 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1727 /* Description: */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1728 /* ------------ */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1729 /* This function is equivalemt of memcopy. Thid function */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1730 /* does only 8/16 bit accessed to both source and */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1731 /* destination */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1732 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1733 /* Input parameter: */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1734 /* --------------- */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1735 /* "src" - input pointer */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1736 /* "len" - number of bytes to copy */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1737 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1738 /* Output parameter: */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1739 /* ---------------- */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1740 /* "dst" - output pointer */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1741 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1742 /*--------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1743 void l1_memcpy_16bit(void *dst,void* src,unsigned int len) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1744 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1745 unsigned int i; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1746 unsigned int tempLen; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1747 unsigned char *cdst,*csrc; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1748 unsigned short *ssrc,*sdst; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1749 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1750 cdst=dst; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1751 csrc=src; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1752 sdst=dst; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1753 ssrc=src; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1754 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1755 if(((unsigned int)src&0x01) || ((unsigned int)dst&0x01)){ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1756 // if either source or destination is not 16-bit aligned do the entire memcopy |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1757 // in 8-bit |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1758 for(i=0;i<len;i++){ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1759 *cdst++=*csrc++; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1760 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1761 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1762 else{ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1763 // if both the source and destination are 16-bit aligned do the memcopy |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1764 // in 16-bits |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1765 tempLen = len>>1; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1766 for(i=0;i<tempLen;i++){ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1767 *sdst++ = *ssrc++; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1768 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1769 if(len & 0x1){ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1770 // if the caller wanted to copy odd number of bytes do a last 8-bit copy |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1771 cdst=(unsigned char*)sdst; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1772 csrc=(unsigned char*)ssrc; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1773 *cdst++ = *csrc++; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1774 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1775 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1776 return; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1777 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1778 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1779 /*-----------------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1780 /* l1s_restore_synchro */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1781 /*-----------------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1782 /* Description: */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1783 /* ------------ */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1784 /* This function restores TPU synchro after an actiity */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1785 /* using synchro/synchro back scheme. */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1786 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1787 /* Input parameters: */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1788 /* ----------------- */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1789 /* None */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1790 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1791 /* Input parameters from globals: */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1792 /* ------------------------------ */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1793 /* l1s.tpu_offset */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1794 /* l1s.next_time */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1795 /* l1s.next_plus_time */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1796 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1797 /* Output parameters: */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1798 /* ------------------ */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1799 /* None */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1800 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1801 /* Modified parameters from globals: */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1802 /* --------------------------------- */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1803 /* l1s.actual_time */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1804 /* l1s.next_time */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1805 /* l1s.next_plus_time */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1806 /* l1s.tpu_ctrl_reg */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1807 /* l1s.dsp_ctrl_reg */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1808 /*-----------------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1809 void l1s_restore_synchro(void) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1810 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1811 // Slide synchro back to mach current serving timeslot. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1812 l1dmacro_synchro(SWITCH_TIME, l1s.tpu_offset); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1813 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1814 // Increment frame number. |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1815 #if L1_GPRS |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1816 l1s.actual_time = l1s.next_time; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1817 l1s.next_time = l1s.next_plus_time; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1818 l1s_increment_time(&(l1s.next_plus_time), 1); // Increment "next_plus time". |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1819 #else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1820 l1s.actual_time = l1s.next_time; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1821 l1s_increment_time(&(l1s.next_time), 1); // Increment "next time". |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1822 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1823 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1824 l1s.tpu_ctrl_reg |= CTRL_SYCB; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1825 l1s.dsp_ctrl_reg |= CTRL_SYNC; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1826 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1827 #if (TRACE_TYPE == 1) || (TRACE_TYPE == 4) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1828 trace_fct(CST_L1S_ADJUST_TIME, (UWORD32)(-1)); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1829 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1830 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1831 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1832 #if (FF_L1_FAST_DECODING == 1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1833 BOOL l1s_check_deferred_control(UWORD8 task, UWORD8 burst_id) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1834 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1835 /* Control activities are performed only if: |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1836 - Fast decoding is not authorized |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1837 - Fast decoding authorized, control running inside the fast HISR context and not first burst |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1838 - Fast decoding authorized, control running inside L1S context and first burst */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1839 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1840 /* Running from fast API HISR? */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1841 BOOL fast_decoding_hisr = (l1a_apihisr_com.fast_decoding.status == C_FAST_DECODING_PROCESSING); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1842 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1843 if (fast_decoding_hisr && (burst_id == BURST_1)) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1844 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1845 /* Error this case shouldn't happen */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1846 return TRUE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1847 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1848 else if (!fast_decoding_hisr && (burst_id != BURST_1)) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1849 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1850 /* Currently running from L1S, control must be performed on the upcoming fast HISR */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1851 l1a_apihisr_com.fast_decoding.task = task; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1852 l1a_apihisr_com.fast_decoding.burst_id = burst_id; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1853 /* If a tasks semaphore get SET do not do deferred control */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1854 if(!(l1a_l1s_com.task_param[task] == SEMAPHORE_SET)) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1855 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1856 l1a_apihisr_com.fast_decoding.deferred_control_req = TRUE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1857 return TRUE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1858 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1859 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1860 else if (!fast_decoding_hisr && (burst_id == BURST_1)) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1861 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1862 /* Control running from L1S for the first burst => Control must be performed now. */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1863 /* As a result, a fast API IT will be triggered on the next frame */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1864 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1865 if (l1a_apihisr_com.fast_decoding.status == C_FAST_DECODING_AWAITED) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1866 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1867 /* A fast API IT was already awaited. It means that we are starting the fast decoding */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1868 /* of a new block before the previous one is finished. */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1869 /* This case is signaled through the variable below so the status can stay as awaited */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1870 /* for the first fast API IT of the new block. */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1871 l1a_apihisr_com.fast_decoding.contiguous_decoding = TRUE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1872 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1873 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1874 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1875 l1a_apihisr_com.fast_decoding.status = C_FAST_DECODING_AWAITED; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1876 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1877 l1a_apihisr_com.fast_decoding.task = task; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1878 return FALSE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1879 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1880 /* In other cases do control now. */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1881 return FALSE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1882 } /* end function l1s_check_deferred_control */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1883 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1884 BOOL l1s_check_fast_decoding_authorized(UWORD8 task) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1885 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1886 BOOL result = FALSE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1887 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1888 /* Is a fast decoding already in progress (AWAITED or PROCESSING states)? */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1889 /* Is a fast decoding complete but waiting for the read activity (COMPLETE state)? */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1890 /* In that case, it will continue, even if a mode change has occured. */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1891 BOOL already_in_progress = ( (l1a_apihisr_com.fast_decoding.status == C_FAST_DECODING_AWAITED) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1892 || (l1a_apihisr_com.fast_decoding.status == C_FAST_DECODING_PROCESSING) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1893 || (l1a_apihisr_com.fast_decoding.status == C_FAST_DECODING_COMPLETE) ); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1894 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1895 /* One variable used later that contains the status of several tasks */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1896 BOOL no_serving_audio_and_neighbour_tasks = ( |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1897 (l1a_l1s_com.l1s_en_task[EP] == TASK_DISABLED) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1898 && (l1a_l1s_com.l1s_en_task[ALLC] == TASK_DISABLED) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1899 && (l1a_l1s_com.l1s_en_task[NSYNC] == TASK_DISABLED) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1900 && (l1a_l1s_com.l1s_en_task[FBNEW] == TASK_DISABLED) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1901 && (l1a_l1s_com.l1s_en_task[SBCONF] == TASK_DISABLED) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1902 && (l1a_l1s_com.l1s_en_task[BCCHN] == TASK_DISABLED) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1903 && (l1a_l1s_com.l1s_en_task[EBCCHS] == TASK_DISABLED) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1904 //&& (l1a_l1s_com.l1s_en_task[NBCCHS] == TASK_DISABLED) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1905 && (l1a_l1s_com.l1s_en_task[BCCHN_TOP] == TASK_DISABLED) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1906 #if (L1_GPRS) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1907 && (l1a_l1s_com.l1s_en_task[PBCCHS] == TASK_DISABLED) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1908 && (l1a_l1s_com.l1s_en_task[PEP] == TASK_DISABLED) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1909 && (l1a_l1s_com.l1s_en_task[PALLC] == TASK_DISABLED) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1910 && (l1a_l1s_com.l1s_en_task[PBCCHN_IDLE] == TASK_DISABLED) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1911 #endif /* L1_GPRS */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1912 //&& (l1a_l1s_com.l1s_en_task[SMSCB] == TASK_DISABLED) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1913 #if (L1_MP3 == 1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1914 && (l1a_apihisr_com.mp3.running == FALSE) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1915 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1916 #if (L1_AAC == 1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1917 && (l1a_apihisr_com.aac.running == FALSE) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1918 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1919 ); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1920 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1921 /* If fast decoding is already forbidden, do not enable it until the end of the block. */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1922 /* The forbidden status is reset at the first control of the block */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1923 if (l1a_apihisr_com.fast_decoding.status == C_FAST_DECODING_FORBIDDEN) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1924 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1925 return FALSE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1926 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1927 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1928 switch(task) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1929 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1930 case NP: |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1931 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1932 /* Enable Fast Paging (NP) except if CCCH reorg*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1933 if ( ( already_in_progress == TRUE ) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1934 || |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1935 ( (l1a_l1s_com.mode == I_MODE) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1936 && (l1a_l1s_com.l1s_en_task[NP] == TASK_ENABLED) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1937 && (no_serving_audio_and_neighbour_tasks == TRUE) ) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1938 ) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1939 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1940 result = TRUE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1941 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1942 break; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1943 } /* case NP */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1944 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1945 case NBCCHS: |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1946 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1947 /* Enable Fast Paging (NP) except if CCCH reorg*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1948 if ( ( already_in_progress == TRUE ) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1949 || |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1950 ( (l1a_l1s_com.mode == I_MODE) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1951 && (l1a_l1s_com.l1s_en_task[NBCCHS] == TASK_ENABLED) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1952 && (no_serving_audio_and_neighbour_tasks == TRUE) ) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1953 ) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1954 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1955 result = TRUE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1956 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1957 break; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1958 } /* case NBCCHS */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1959 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1960 #if (L1_GPRS) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1961 case PNP: |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1962 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1963 /* Enable Fast Paging (PNP) except if PCCCH reorg*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1964 if ( ( already_in_progress == TRUE ) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1965 || |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1966 ( (l1a_l1s_com.mode == I_MODE) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1967 && (l1a_l1s_com.l1s_en_task[PNP] == TASK_ENABLED) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1968 && (no_serving_audio_and_neighbour_tasks == TRUE) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1969 ) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1970 ) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1971 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1972 result = TRUE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1973 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1974 break; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1975 } /* case PNP */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1976 #endif /* L1_GPRS*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1977 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1978 } /* switch(task) */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1979 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1980 #if (L1_GPRS) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1981 if ((result == FALSE) && ((task == NP) || (task == PNP) || (task == NBCCHS))) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1982 #else /* NO_GPRS*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1983 if ((result == FALSE) && ((task == NP) || (task == NBCCHS))) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1984 #endif /* L1_GPRS */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1985 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1986 l1a_apihisr_com.fast_decoding.status = C_FAST_DECODING_FORBIDDEN; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1987 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1988 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1989 return result; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1990 } /* end function l1s_check_fast_decoding_authorized */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1991 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1992 #endif /* FF_L1_FAST_DECODING */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1993 /*-----------------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1994 /* l1s_check_sacch_dl_block */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1995 /*-----------------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1996 /* Description: */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1997 /* ------------ */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1998 /* Downlink SACCH buffer comparison function for FER Traces */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1999 /* This is called only when there is a successfully decoded */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2000 /* block. The count of no of successfully decoded SACCH blocks */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2001 /* is updated. */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2002 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2003 /* Input parameters: */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2004 /* ----------------- */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2005 /* sacch_dl_block "Downlink SACCH BLOCK" */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2006 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2007 /* Output parameters: */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2008 /* ------------------ */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2009 /* None */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2010 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2011 /*-----------------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2012 #if ((FF_REPEATED_SACCH) && (TRACE_TYPE ==1 || TRACE_TYPE == 4)) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2013 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2014 void l1s_check_sacch_dl_block(API *sacch_dl_block) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2015 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2016 int i,j,repeat=1; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2017 if( trace_info.repeat_sacch.dl_buffer_empty == FALSE ) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2018 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2019 for(i=3,j=0;i<15;i++,j++) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2020 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2021 if(trace_info.repeat_sacch.dl_buffer[j] != sacch_dl_block[i]) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2022 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2023 break; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2024 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2025 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2026 if( i != 15 ) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2027 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2028 repeat=0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2029 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2030 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2031 else /* if( trace_info.repeat_sacch.dl_buffer_empty == FALSE ) */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2032 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2033 repeat=0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2034 } /* end else empty DL SACCH buffer*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2035 if(repeat == 0) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2036 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2037 trace_info.repeat_sacch.dl_good_norep++; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2038 for ( i=3 ; i<15 ; i++ ) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2039 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2040 trace_info.repeat_sacch.dl_buffer[i] = sacch_dl_block[i];// info_address[i]; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2041 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2042 trace_info.repeat_sacch.dl_buffer_empty = FALSE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2043 } /* end if repeat = 0*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2044 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2045 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2046 trace_info.repeat_sacch.dl_buffer_empty = TRUE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2047 } /* end else repeat = 1*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2048 } /* end function void l1s_check_sacch_dl_block */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2049 #endif /* ((FF_REPEATED_SACCH) && (TRACE_TYPE ==1 || TRACE_TYPE == 4)) */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2050 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2051 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2052 /*-----------------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2053 /* l1s_store_sacch_buffer */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2054 /*-----------------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2055 /* Description: */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2056 /* ------------ */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2057 /* Function to store data in case of a retransmission. */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2058 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2059 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2060 /* Input parameters: */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2061 /* ----------------- */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2062 /* sacch_ul_block "SACCH Uplink block to be stored" */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2063 /* repeat_sacch "The buffer tocontain the stored block" */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2064 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2065 /* Output parameters: */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2066 /* ------------------ */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2067 /* None */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2068 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2069 /*-----------------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2070 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2071 #if (FF_REPEATED_SACCH == 1 ) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2072 void l1s_store_sacch_buffer(T_REPEAT_SACCH *repeat_sacch, UWORD8 *sacch_ul_block) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2073 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2074 int i=0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2075 /* Store the first 11 words after header in the first 22 bytes. */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2076 for(i=0;i<23;i++) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2077 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2078 repeat_sacch->buffer[i] = sacch_ul_block[i] ; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2079 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2080 repeat_sacch->buffer_empty = FALSE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2081 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2082 #endif /* (FF_REPEATED_SACCH == 1 ) */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2083 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2084 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2085 /*-----------------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2086 /* l1s_repeated_facch_check */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2087 /*-----------------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2088 /* Description: */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2089 /* ------------ */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2090 /* If two successfully decoded blocks (separated by 8 or 9 frames) are */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2091 /* identical then it returns a NULL buffer otherwise a pointer to the last block */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2092 /* data. */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2093 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2094 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2095 /* Input parameters: */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2096 /* ----------------- */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2097 /* "FACCH block to be stored" */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2098 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2099 /* Output parameters: */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2100 /* ------------------ */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2101 /* None */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2102 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2103 /*-----------------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2104 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2105 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2106 #if ( FF_REPEATED_DL_FACCH == 1 ) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2107 API * l1s_repeated_facch_check(API *info_address) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2108 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2109 unsigned int repeat=1; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2110 unsigned int i,j; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2111 UWORD8 counter_candidate; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2112 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2113 counter_candidate=l1s.repeated_facch.counter_candidate; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2114 if( l1s.repeated_facch.pipeline[counter_candidate].buffer_empty == FALSE ) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2115 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2116 for(i=3,j=0;i<15;j++,i++) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2117 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2118 if(l1s.repeated_facch.pipeline[counter_candidate].buffer[j] != info_address[i]) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2119 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2120 break; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2121 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2122 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2123 if( i != 15 ) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2124 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2125 repeat=0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2126 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2127 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2128 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2129 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2130 repeat=0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2131 } /* end else buffer empty*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2132 #if TESTMODE |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2133 if(l1_config.repeat_facch_dl_enable != REPEATED_FACCHDL_ENABLE) // repeated FACCH mode is disabled |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2134 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2135 repeat = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2136 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2137 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2138 if(repeat == 0) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2139 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2140 return &info_address[0]; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2141 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2142 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2143 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2144 #if (TRACE_TYPE==1) || (TRACE_TYPE==4) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2145 trace_info.facch_dl_repetition_block_count++; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2146 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2147 if (((l1s.actual_time.fn - fn_prev ) == 8) || ((l1s.actual_time.fn - fn_prev ) == 9 )) // added debug |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2148 return (API)NULL; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2149 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2150 return &info_address[0]; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2151 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2152 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2153 #endif /* FF_REPEATED_DL_FACCH == 1 */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2154 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2155 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2156 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2157 #if ( FF_REPEATED_DL_FACCH == 1 ) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2158 void l1s_store_facch_buffer(T_REPEAT_FACCH *repeated_facch, API *facch_block) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2159 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2160 int i; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2161 UWORD8 counter_candidate; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2162 fn_prev = l1s.actual_time.fn ;// added |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2163 counter_candidate=repeated_facch->counter_candidate; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2164 /* Store the first 12 words after header in the first 23 bytes. */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2165 for(i=0;i<13;i++) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2166 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2167 repeated_facch->pipeline[counter_candidate].buffer[i] = facch_block[i] ; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2168 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2169 repeated_facch->pipeline[counter_candidate].buffer_empty = FALSE; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2170 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2171 #endif /* ( FF_REPEATED_DL_FACCH == 1 ) */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2172 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2173 #if(L1_FF_MULTIBAND == 1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2174 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2175 #if 0 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2176 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2177 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2178 /* l1_multiband_radio_freq_convert_into_effective_band_id*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2179 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2180 /* Parameters : radio_freq the frequency to convert */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2181 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2182 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2183 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2184 /* Return : the ID of the effectiev band in which */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2185 /* is located radio_freq */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2186 /* Functionality : compare radio_freq with the effective */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2187 /* bands ranges, return efective_band_id */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2188 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2189 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2190 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2191 UWORD8 l1_multiband_radio_freq_convert_into_effective_band_id(UWORD16 radio_freq) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2192 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2193 UWORD8 effective_band_id = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2194 while( effective_band_id < NB_MAX_EFFECTIVE_SUPPORTED_BANDS) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2195 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2196 if ((radio_freq >= multiband_conversion_data[effective_band_id].first_radio_freq) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2197 && (radio_freq < (multiband_conversion_data[effective_band_id].first_radio_freq + multiband_conversion_data[effective_band_id].nbmax_carrier)) ) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2198 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2199 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2200 return(effective_band_id); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2201 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2202 else |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2203 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2204 effective_band_id ++; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2205 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2206 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2207 if(effective_band_id == NB_MAX_EFFECTIVE_SUPPORTED_BANDS) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2208 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2209 l1_multiband_error_handler(radio_freq); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2210 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2211 return(effective_band_id); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2212 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2213 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2214 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2215 /* l1_multiband_radio_freq_convert_into_physical_band_id */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2216 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2217 /* Parameters : radio_freq the frequency to convert */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2218 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2219 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2220 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2221 /* Return : the ID of the physical_band band in which*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2222 /* radio_freq is located */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2223 /* Functionality : Identify effective_band_id, the ID of */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2224 /* the effective band in whicb radio_freq is located */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2225 /* then derive physical_band_id from effective_band_id */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2226 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2227 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2228 UWORD8 l1_multiband_radio_freq_convert_into_physical_band_id(UWORD16 radio_freq) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2229 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2230 UWORD8 effective_band_id, physical_band_id; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2231 effective_band_id = l1_multiband_radio_freq_convert_into_effective_band_id(radio_freq); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2232 physical_band_id = multiband_conversion_data[effective_band_id].physical_band_id; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2233 return(physical_band_id); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2234 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2235 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2236 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2237 /* l1_multiband_radio_freq_convert_into_operative_radio_freq*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2238 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2239 /* Parameters : radio_freq the frequency to convert */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2240 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2241 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2242 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2243 /* Return : the operative_radio_freq corresponding to radio_freq */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2244 /* Functionality : identify effective_band_id, then */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2245 /* based on the relationships linking the ranges of operative_radio_freq*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2246 /* and radio_freq , derive operative_radio_freq */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2247 /*-------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2248 UWORD16 l1_multiband_radio_freq_convert_into_operative_radio_freq(UWORD16 radio_freq) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2249 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2250 UWORD8 effective_band_id; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2251 UWORD16 operative_radio_freq; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2252 effective_band_id = l1_multiband_radio_freq_convert_into_effective_band_id(radio_freq); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2253 operative_radio_freq = radio_freq - multiband_conversion_data[effective_band_id].first_radio_freq + multiband_conversion_data[effective_band_id].first_operative_radio_freq; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2254 return(operative_radio_freq); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2255 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2256 /*--------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2257 /* l1_multiband_map_radio_freq_into_tpu_table */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2258 /*--------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2259 /* Parameters : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2260 /* radio_freq the parameter to be converted */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2261 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2262 /* Return : the index in table rf_band or rf_tpu_band */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2263 /* corresponding to radio_freq */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2264 /* Functionality :identify physical_band_id */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2265 /* then derive from physical_band_id, tpu_band_index to be*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2266 /* returned a physical band having the ID physical_band_id*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2267 /* is mapped to the table rf_band[physical_band_id ] */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2268 /*--------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2269 UWORD8 l1_multiband_map_radio_freq_into_tpu_table(UWORD16 radio_freq) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2270 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2271 UWORD8 tpu_table_index = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2272 UWORD8 physical_band_id = 0; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2273 physical_band_id = l1_multiband_radio_freq_convert_into_physical_band_id(radio_freq); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2274 /*For Neptune a band having the ID physical_band_id is mapped to multiband_rf_data[physical_band_id], rf_band[physical_band_id]*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2275 /*Consequently the existence of this API for API is not necessary since it is redundant with l1_multiband_radio_freq_convert_into_physical_band_id*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2276 tpu_table_index = physical_band_id; |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2277 return(tpu_table_index); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2278 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2279 /*--------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2280 /* l1_multiband_error_handler */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2281 /*--------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2282 /* Parameters : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2283 /* radio_freq the channel number received from the L3 */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2284 /* */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2285 /* Return : */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2286 /* corresponding to radio_freq */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2287 /* Functionality :handling error code of MULTIBAND */ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2288 /*--------------------------------------------------------*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2289 void l1_multiband_error_handler(UWORD16 radio_freq) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2290 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2291 L1_MULTIBAND_TRACE_PARAMS(MULTIBAND_ERROR_TRACE_ID, 1); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2292 #if (OP_L1_STANDALONE == 1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2293 #if(CODE_VERSION == NOT_SIMULATION) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2294 L1BSP_error_handler(); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2295 #endif /*if(CODE_VERSION == NOT_SIMULATION)*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2296 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2297 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2298 #endif // if 0 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2299 #endif /*if (L1_FF_MULTIBAND == 1)*/ |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2300 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2301 #if (OP_L1_STANDALONE == 1) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2302 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2303 UWORD8 l1_get_pwr_mngt() |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2304 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2305 return(l1_config.pwr_mngt); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2306 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2307 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2308 #endif |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2309 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2310 void l1_multiband_error_handler(UWORD16 radio_freq) |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2311 { |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2312 while(1); |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2313 } |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2314 |
ba58ce852caf
l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2315 |