annotate chipsetsw/layer1/cfile/l1_func.c @ 102:334789c5338c

l1_func.c: l1s_restore_synchro() removed - not applicable to our config
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Thu, 07 Apr 2016 19:54:47 +0000
parents a103d40accc2
children e3faf217ac9e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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"
101
a103d40accc2 l1_func.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 100
diff changeset
75 #if (RF_FAM == 12)
a103d40accc2 l1_func.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 100
diff changeset
76 #include "l1_rf12.h"
a103d40accc2 l1_func.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 100
diff changeset
77 #elif (RF_FAM == 61)
a103d40accc2 l1_func.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 100
diff changeset
78 #include "l1_rf61.h"
a103d40accc2 l1_func.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 100
diff changeset
79 #endif
100
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
80 #include "l1_time.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
81 #include "l1_signa.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
82
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
83 #if TESTMODE
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
84 #include "l1tm_defty.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
85 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
86 #if (AUDIO_TASK == 1)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
87 #include "l1audio_const.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
88 #include "l1audio_cust.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
89 #include "l1audio_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_GTT == 1)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
92 #include "l1gtt_const.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
93 #include "l1gtt_defty.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
94 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
95 #if (L1_MP3 == 1)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
96 #include "l1mp3_defty.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
97 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
98 #if (L1_MIDI == 1)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
99 #include "l1midi_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 //ADDED FOR AAC
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
102 #if (L1_AAC == 1)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
103 #include "l1aac_defty.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
104 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
105 #include "l1_defty.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
106 #include "cust_os.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
107 #include "l1_msgty.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
108 #include "l1_varex.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
109 #include "l1_proto.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
110 #include "l1_mftab.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
111 #include "l1_tabs.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
112 #include "l1_ver.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
113 #include "tpudrv.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
114
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
115 #include "mem.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
116 #include "inth.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
117 #include "clkm.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
118 #include "rhea_arm.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
119 #include "dma.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
120 #include "ulpd.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
121 #include "leadapi.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
122
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
123 #if (OP_L1_STANDALONE)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
124 #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
125 (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
126 #include "dynamic_clock.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
127 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
128 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
129
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
130
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
131 #if L1_GPRS
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
132 #include "l1p_cons.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
133 #include "l1p_msgt.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
134 #include "l1p_deft.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
135 #include "l1p_vare.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
136 #include "l1p_tabs.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
137 #include "l1p_macr.h"
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
138 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
139
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
140 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
141 #include "l1_trace.h"
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 #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
144 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
145 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
146
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
147
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
148 #if (CODE_VERSION != SIMULATION)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
149
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
150 /* DSP patch */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
151 #if (DWNLD == NO_DWNLD)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
152 const UWORD8 patch_array[1];
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 == PATCH_DWNLD)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
156 extern const UWORD8 patch_array[] ;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
157 const UWORD8 DspCode_array[1] ;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
158 const UWORD8 DspData_array[1];
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
159 #elif (DWNLD == DSP_DWNLD)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
160 const UWORD8 patch_array[1] ;
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 #else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
164 extern const UWORD8 patch_array[] ;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
165 extern const UWORD8 DspCode_array[] ;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
166 extern const UWORD8 DspData_array[];
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
167 #endif
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 extern const UWORD8 bootCode[] ;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
170 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
171 /* DSP patch */
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
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 /* 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
176 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
177 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
178
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
179 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
180 /* 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
181 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
182 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
183 void LA_ReleaseLead(void);
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
184 #if (CODE_VERSION != SIMULATION)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
185 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
186 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
187
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
188 #if (L1_GPRS)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
189 // external functions from GPRS implementation
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
190 void initialize_l1pvar(void);
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
191 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
192 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
193 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
194 /* dsp_power_on() */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
195 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
196 /* Parameters : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
197 /* Return : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
198 /* Functionality : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
199 /* 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
200 /* 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
201 /* (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
202 /* is not running yet) : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
203 /* ==> check string size < 256 !!!!!! */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
204 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
205 void dsp_power_on(void)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
206 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
207 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
208 UWORD16 param_size;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
209 #if IDS
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
210 UWORD16 param_size2;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
211 #endif
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 API i;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
214 API *pt;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
215 volatile WORD16 j;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
216
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
217 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
218
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
219 #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
220 static API_SIGNED param_tab[] = {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
221
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
222 D_TRANSFER_RATE,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
223
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
224 // ..................Latencies
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
225 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
226
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
227 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
228
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
229 //...................p_gprs_install_adress
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
230 D_HOLE,
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_misc_config
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
233 D_MISC_CONFIG,
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
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
236 //...................d_cn_sw_workaround
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
237 C_DSP_SW_WORK_AROUND,
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 //...................Reserved
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
240 D_HOLE, D_HOLE,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
241 D_HOLE, D_HOLE,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
242
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
243 //...................Frequency burst
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
244 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
245 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
246 D_FB_THR_DET_TRACK,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
247 //...................Demodulation
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
248 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
249 D_DEM_POND_RED,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
250 //...................TCH Full Speech
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
251 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
252 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
253 D_SM, D_B,
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 //...................V42 bis
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
256 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
257 D_V42B_RESET_DELAY,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
258
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
259 //...................TCH Half Speech
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
260 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
261 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
262 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
263
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
264 //...................Added variables for EFR
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
265 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
266 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
267 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
268
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
269 //...................Full rate variables
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
270 D_SD_MIN_THR_TCHFS,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
271 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
272
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
273 //...................TCH Half 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_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
275 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
276
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
277 //...................TCH Enhanced Full Rate Speech
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
278 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
279 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
280
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
281 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
282 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
283 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
284
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
285 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
286 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
287 };
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
288 param_size = 79;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
289
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
290 #if (OP_L1_STANDALONE)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
291 #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
292 (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
293 /* Dynamic clock configuration */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
294 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
295 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
296 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
297 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
298 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
299 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
300 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
301
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
302 #elif (DSP == 33)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
303 static API_SIGNED param_tab[] = {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
304
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
305 D_TRANSFER_RATE,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
306
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
307 // ..................Latencies
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
308 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
309
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
310 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
311
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
312 //...................p_gprs_install_adress
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
313 D_HOLE,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
314
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
315 //...................d_misc_config
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
316 D_MISC_CONFIG,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
317
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
318 //...................d_cn_sw_workaround
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
319 C_DSP_SW_WORK_AROUND,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
320
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
321 #if DCO_ALGO
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
322 //...................d_cn_dco_param
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
323 C_CN_DCO_PARAM,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
324 #else
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,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
327 #endif
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 //...................Reserved
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
330 D_HOLE, D_HOLE,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
331 D_HOLE,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
332
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
333 //...................Frequency burst
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
334 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
335 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
336 D_FB_THR_DET_TRACK,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
337 //...................Demodulation
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
338 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
339 D_DEM_POND_RED,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
340 //...................TCH Full Speech
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
341 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
342 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
343 D_SM, D_B,
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 //...................V42 bis
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
346 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
347 D_V42B_RESET_DELAY,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
348
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
349 //...................TCH Half Speech
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
350 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
351 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
352 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
353
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
354 //...................Added variables for EFR
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
355 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
356 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
357 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
358
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
359 //...................Full rate variables
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
360 D_SD_MIN_THR_TCHFS,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
361 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
362
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
363 //...................TCH Half 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_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
365 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
366
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
367 //...................TCH Enhanced Full Rate Speech
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
368 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
369 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
370
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
371 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
372 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
373 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
374
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
375 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
376 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
377 };
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
378 param_size = 79;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
379
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
380 #if (OP_L1_STANDALONE)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
381 #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
382 (CHIPSET == 11) || (CHIPSET == 12)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
383 /* Dynamic clock configuration */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
384 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
385 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
386 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
387 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
388 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
389 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
390 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
391
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
392 #else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
393
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
394 #if (VOC == FR)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
395 static API_SIGNED param_tab[] = {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
396 //...................Frequency burst
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
397 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
398 D_FB_THR_DET_TRACK,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
399 //...................Demodulation
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
400 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
401 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
402 //...................TCH Full Speech
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
403 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
404 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
405 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
406 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
407 //...................TCH Half Speech
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
408 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
409 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
410 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
411 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
412 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
413 D_DSP_TEST
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
414 };
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
415 param_size = 38;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
416 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
417
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
418 #if (VOC == FR_HR)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
419 static API_SIGNED param_tab[] = {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
420 //...................Frequency burst
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
421 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
422 D_FB_THR_DET_TRACK,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
423 //...................Demodulation
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
424 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
425 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
426 //...................TCH Full Speech
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
427 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
428 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
429 D_SM, D_B,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
430 //...................TCH Half Speech
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
431 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
432 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
433 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
434 //...................TCH Full Speech
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
435 D_SD_MIN_THR_TCHFS,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
436 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
437 //...................TCH Half Speech
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
438 D_SD_MIN_THR_TCHHS,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
439 D_MA_MIN_THR_TCHHS,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
440 D_SD_AV_THR_TCHHS,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
441 D_MD_MAX_THR_TCHHS,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
442 D_MD1_MAX_THR_TCHHS,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
443 D_WED_FIL_INI,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
444 D_WED_FIL_TC,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
445 D_X_MIN,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
446 D_X_MAX,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
447 D_SLOPE,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
448 D_Y_MIN,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
449 D_Y_MAX,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
450 D_WED_DIFF_THRESHOLD,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
451 D_MABFI_MIN_THR_TCHHS,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
452 D_FACCH_THR,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
453 D_DSP_TEST
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
454 };
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
455 param_size = 46;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
456 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
457
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
458 #if (VOC == FR_EFR)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
459 static API_SIGNED param_tab[] = {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
460 //...................Frequency burst
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
461 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
462 D_FB_THR_DET_TRACK,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
463 //...................Demodulation
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
464 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
465 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
466
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
467 //...................TCH Full Speech
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
468 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
469 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
470 D_SM, D_B,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
471
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
472 //...................Added variables for EFR
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
473 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
474 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
475 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
476
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
477 //...................Full rate variables
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
478 D_SD_MIN_THR_TCHFS,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
479 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
480
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
481 //...................TCH Enhanced Full Rate Speech
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
482 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
483 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
484
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
485 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
486 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
487 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
488 D_DSP_TEST
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
489 };
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
490 param_size = 46;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
491 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
492
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
493 #if (VOC == FR_HR_EFR)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
494 static API_SIGNED param_tab[] = {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
495 //...................Frequency burst
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
496 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
497 D_FB_THR_DET_TRACK,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
498 //...................Demodulation
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
499 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
500 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
501 //...................TCH Full Speech
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
502 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
503 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
504 D_SM, D_B,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
505
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
506 //...................TCH Half Speech
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
507 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
508 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
509 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
510
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
511 //...................Added variables for EFR
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
512 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
513 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
514 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
515
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
516 //...................Full rate variables
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
517 D_SD_MIN_THR_TCHFS,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
518 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
519
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
520 //...................TCH Half 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_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
522 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
523
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
524 //...................TCH Enhanced Full Rate Speech
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
525 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
526 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
527
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
528 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
529 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
530 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
531 D_HOLE,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
532
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
533 //...................Data patch provisions
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
534 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
535
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
536 //...................Version Number, TI Number
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
537 D_HOLE, D_HOLE,
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
538
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
539 // ..................DSP page
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
540 D_DSP_TEST
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
541
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
542 #if IDS
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
543 ,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
544 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
545 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
546
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
547 };
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
548 param_size = 67;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
549 #if IDS
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
550 // 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
551 // set PARAM memory
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
552 param_size2 = 5;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
553 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
554 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
555 #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
556
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
557 // NDB pointer.
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
558 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
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 //-------------
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
562 // DSP STARTUP
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
563 //-------------
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
564 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
565 #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
566 #if (CHIPSET == 1)
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\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
568 #elif (CHIPSET == 2)
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\rHERCULES 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 == 3)
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/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
572 #elif (CHIPSET == 4)
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\rSAMSON test code\n\r----------------");
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
574 #elif (CHIPSET == 5)
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\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
576 #elif (CHIPSET == 6)
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\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
578 #elif (CHIPSET == 7)
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\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
580 #elif (CHIPSET == 8)
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 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
582 #elif (CHIPSET == 9)
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\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
584 #elif (CHIPSET == 10) || (CHIPSET == 11)
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\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
586 #elif (CHIPSET == 12)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
587 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
588 #elif (CHIPSET == 15)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
589 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
590 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
591 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
592
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
593 #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
594 /* Display Audio Configuration */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
595 L1_trace_string ("\n\rAUDIO: ");
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
596 #if (KEYBEEP)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
597 L1_trace_string ("KB ");
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
598 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
599 #if (TONE)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
600 L1_trace_string ("TN ");
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
601 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
602 #if (MELODY_E1)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
603 L1_trace_string ("E1 ");
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
604 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
605 #if (MELODY_E2)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
606 L1_trace_string ("E2 ");
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
607 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
608 #if (VOICE_MEMO)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
609 L1_trace_string ("VM ");
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
610 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
611 #if (L1_VOICE_MEMO_AMR)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
612 L1_trace_string ("VMA ");
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
613 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
614 #if (SPEECH_RECO)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
615 L1_trace_string ("SR ");
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
616 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
617 #if (L1_NEW_AEC)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
618 L1_trace_string ("NEWAEC ");
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
619 #elif (AEC)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
620 L1_trace_string ("AEC ");
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
621 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
622 #if (L1_GTT)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
623 L1_trace_string ("GTT ");
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
624 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
625 #if (FIR)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
626 L1_trace_string ("FIR ");
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
627 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
628 #if (AUDIO_MODE)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
629 L1_trace_string ("AUM ");
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
630 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
631 #if (L1_CPORT == 1)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
632 L1_trace_string ("CPO ");
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
633 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
634 #if (L1_STEREOPATH == 1)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
635 L1_trace_string ("STP ");
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
636 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
637 #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
638 L1_trace_string ("EAM ");
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
639 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
640 L1_trace_string ("\n\r");
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
641 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
642 // 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
643 LA_ReleaseLead();
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
644
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
645 // 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
646 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
647 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
648 // 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
649
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
650 // GSM 1.5
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
651 //-----------------------------------------------------------------
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
652 // 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
653 // 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
654 // 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
655 // 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
656 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
657
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
658
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
659 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
660 // NO DOWNLOAD...
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 #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
663 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
664 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
665
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
666 // 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
667 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
668
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
669 // Set DSP start address.
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
670 dsp_start_address = DSP_START;
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 else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
673 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
674 // DSP CODE DOWNLOAD...
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
675 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
676 WORD32 load_result;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
677
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
678 #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
679 #if (VOC == FR)
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 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_HR)
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&HR 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_EFR)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
688 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
689 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
690
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
691 #if (VOC == FR_HR_EFR)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
692 #if IDS
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
693 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
694 #else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
695 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
696 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
697 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
698 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
699
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
700 // 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
701 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
702
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
703 #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
704 if(load_result)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
705 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
706 else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
707 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
708 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
709
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
710 #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
711 #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
712 #if (VOC == FR_HR)
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&HR 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_EFR)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
717 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
718 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
719
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
720 #if (VOC == FR_HR_EFR)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
721 #if IDS
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
722 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
723 #else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
724 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
725 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
726 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
727 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
728
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
729 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
730
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
731 #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
732 if(load_result)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
733 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
734 else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
735 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
736 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
737 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
738
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
739 // Set DSP start address;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
740 dsp_start_address = DSP_START;
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 else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
743 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
744 // DSP PATCH DOWNLOAD...
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
745 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
746 WORD32 load_result;
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 #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
749 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
750 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
751
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
752 // 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
753 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
754
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
755 #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
756 if(load_result)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
757 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
758 else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
759 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
760 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
761
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
762 // 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
763 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
764 dsp_start_address <<= 8;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
765 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
766
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
767 // 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
768 if(dsp_start_address == 0)
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 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
771 dsp_start_address <<= 8;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
772 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
773 }
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 else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
776 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
777 // DSP CODE DOWNLOAD + PATCH DOWNLOAD...
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
778 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
779 WORD32 load_result;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
780
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
781 #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
782 #if (VOC == FR)
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 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_HR)
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&HR 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_EFR)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
791 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
792 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
793
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
794 #if (VOC == FR_HR_EFR)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
795 #if IDS
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
796 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
797 #else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
798 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
799 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
800 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
801 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
802
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
803 // 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
804 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
805
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
806 #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
807 if(load_result)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
808 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
809 else
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-> ... finished !!");
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 #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
814 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
815 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
816
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
817 // 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
818 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
819
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
820 #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
821 if(load_result)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
822 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
823 else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
824 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
825 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
826
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
827 #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
828 #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
829 #if (VOC == FR_HR)
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&HR 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_EFR)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
834 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
835 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
836
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
837 #if (VOC == FR_HR_EFR)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
838 #if IDS
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
839 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
840 #else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
841 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
842 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
843 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
844 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
845
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
846 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
847
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
848 #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
849 if(load_result)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
850 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
851 else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
852 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
853 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
854 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
855
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
856
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
857 // 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
858 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
859 dsp_start_address <<= 8;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
860 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
861
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
862 // 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
863 if(dsp_start_address == 0)
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 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
866 dsp_start_address <<= 8;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
867 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
868 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
869 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
870
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
871 #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
872 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
873 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
874 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
875 }
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 #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
878 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
879 #endif
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 //--------------------------------------------------------------
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
882 // Loading of NDB parameters.......
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
883 //--------------------------------------------------------------
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
884
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
885 #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
886 // 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
887 // as in GSM.
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
888 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
889 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
890 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
891 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
892 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
893 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
894 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
895 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
896 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
897
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
898
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
899 #if (CHIPSET == 12) || (CHIPSET == 15)
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 = 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
901 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
902 #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
903 #if (L1_SAIC != 0)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
904 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
905 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
906 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
907 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
908 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
909
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
910 #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
911 // 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
912 // 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
913 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
914 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
915
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
916 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
917 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
918
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
919 // 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
920 #if (!L1_NEW_AEC)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
921 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
922 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
923 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
924 #else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
925 #if L1_GPRS
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
926 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
927 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
928
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
929 // 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
930 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
931 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
932 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
933 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
934 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
935
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
936 #if (AMR == 1)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
937 // 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
938 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
939 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
940
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
941 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
942
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
943 //--------------------------------------------------------------
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
944 // Loading of PARAM area.......
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
945 //--------------------------------------------------------------
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
946 // Load PARAM memory...
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
947 pt = (API *) PARAM_ADR;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
948
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
949 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
950 #if (DSP < 33) && (IDS)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
951 pt += 3;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
952 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
953 #endif
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 #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
956 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
957 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
958
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
959 // "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
960 // "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
961 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
962 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
963 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
964 #endif
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 #if L1_GPRS
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 // Loading of GPRS PARAM area.......
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 // Load GPRS PARAM memory...
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
971 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
972 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
973
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
974 // 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
975 // 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
976 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
977 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
978 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
979 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
980
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
981 #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
982
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
983 #if (OP_L1_STANDALONE)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
984 #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
985 (CHIPSET == 11) || (CHIPSET == 12)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
986 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
987 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
988 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
989 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
990
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
991 #if (CHIPSET == 4)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
992 #if (!OP_L1_STANDALONE)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
993 // 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
994 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
995 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
996 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
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_hom2sam = 0x000C;
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 #else
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_bridge = 0x0008;
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 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
1005 #if (!OP_L1_STANDALONE)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1006 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
1007 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1008 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1009
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1010 // 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
1011 // 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
1012 #if (DSP == 31)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1013 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
1014 (l1_config.dwnld == PATCH_DWNLD))
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1015 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
1016 else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1017 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
1018 #else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1019 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
1020 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
1021 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1022 #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
1023 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1024 #endif // L1_GPRS
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 *(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
1027 *(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
1028 *(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
1029
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1030 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1031 #endif //#if CODE_VERSION!=SIMULATION
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1032
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1033 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1034 /* 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
1035 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1036 /* Parameters : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1037 /* Return : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1038 /* Functionality : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1039 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1040 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
1041 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1042 API i;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1043 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
1044 API *ptr = (API *)page_ptr;
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 // Clear all locations.
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1047 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
1048 }
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 #if (DSP == 38) || (DSP == 39)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1051 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1052 /* 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
1053 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1054 /* Parameters : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1055 /* Return : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1056 /* Functionality : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1057 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1058 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
1059 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1060 API i;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1061 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
1062 API *ptr = (API *)page_ptr;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1063
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1064 // Clear all locations.
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1065 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
1066 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1067 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1068 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1069 /* 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
1070 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1071 /* Parameters : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1072 /* Return : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1073 /* Functionality : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1074 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1075 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
1076 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1077 API i;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1078 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
1079 API *ptr = (API *)page_ptr;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1080
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1081 // Clear all locations.
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1082 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
1083
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1084 // 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
1085 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
1086 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1087
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1088 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1089 /* l1s_increment_time() */
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 /* Parameters : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1092 /* Return : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1093 /* Functionality : */
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 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
1096 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1097 // Increment FN % MAX_FN.
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1098 //------------------------
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1099 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
1100
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1101 if(fn_offset == 1)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1102 // Frame by frame increment...
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1103 //----------------------------
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1104 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1105 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
1106 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
1107 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
1108 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
1109 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
1110 if(time->fn_mod13 == 0)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1111 time->fn_mod13_mod4 = 0;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1112
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1113 if(time->t3 == 0)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1114 // 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
1115 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1116 // Increment TC ((FN/51) % 8).
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1117 IncMod(time->tc, 1, 8);
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 // 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
1120 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
1121 }
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 (L1_GPRS)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1124 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
1125 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
1126
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1127 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
1128 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
1129 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1130
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 else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1134 // 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
1135 //-------------------------------
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1136 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1137 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
1138 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
1139 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
1140 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
1141 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
1142 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
1143 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
1144
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1145 #if (L1_GPRS)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1146 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
1147
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1148 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
1149 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
1150 else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1151 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
1152
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1153 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
1154 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1155
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
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1158 // 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
1159 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
1160 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1161 T_CHANNEL_DESCRIPTION *desc_ptr;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1162 UWORD8 timeslot_no;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1163 UWORD8 subchannel;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1164
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1165 // Get a meaningfull channel description.
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1166 //---------------------------------------
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1167 // 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
1168 // 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
1169 // 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
1170 // which carries the SACCH.
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1171 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
1172 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
1173 else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1174 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
1175
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1176 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
1177 subchannel = desc_ptr->subchannel;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1178 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
1179
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1180
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1181 // 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
1182 //------------------------------------------------------
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1183 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
1184 // 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
1185 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1186 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
1187 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
1188 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1189 else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1190 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
1191 // 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
1192 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1193 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
1194 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
1195 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1196 else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1197 // TCH_F or TCH_H...
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1198 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1199 // 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
1200 // 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
1201 // 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
1202 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
1203 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
1204 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1205 }
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
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1208 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1209 /* l1s_encode_rxlev() */
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 /* Parameters : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1212 /* Return : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1213 /* Functionality : */
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 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
1216 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1217 WORD16 rxlev;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1218
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1219 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
1220 // 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
1221
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1222 return(rxlev);
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
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1225 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1226 /* l1s_send_ho_finished() */
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 /* Parameters : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1229 /* Return : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1230 /* Functionality : */
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 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
1233 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1234 xSignalHeaderRec *msg;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1235
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1236 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
1237 DEBUGMSG(status,NU_ALLOC_ERR)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1238 msg->SignalCode = L1C_HANDOVER_FINISHED;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1239 ((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
1240
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1241 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
1242 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
1243 }
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
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1246 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1247 /* l1s_get_versions() */
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 /* Parameters : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1250 /* Return : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1251 /* 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
1252 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1253 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
1254 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1255 //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
1256
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1257 #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
1258 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
1259 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
1260 // 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
1261 // 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
1262 #else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1263 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
1264 // 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
1265 // 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
1266 // 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
1267 #endif
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 return (&l1s.version);
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
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1272 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1273 /* l1s_reset_dedic_meas() */
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 /* Parameters : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1276 /* Return : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1277 /* Functionality : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1278 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1279 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
1280 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1281 // Reset rxlev related fields
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1282 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
1283 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
1284 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
1285 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
1286
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1287 // Reset rxqual related fields
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1288 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
1289 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
1290 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
1291 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
1292
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1293
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1294 #if REL99
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1295 #if FF_EMR
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1296 // Reset EMR variables
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.rxlev_val_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.rxlev_val_nbr_meas = 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.nbr_rcvd_blocks = 0;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1300 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
1301 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
1302 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
1303 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
1304 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1305 #endif
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 // Reset dtx frame counter
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1309 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
1310 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1311
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1312 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1313 /* SwapIQ_dl() */
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 /* Parameters : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1316 /* Return : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1317 /* Functionality : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1318 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1319 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
1320 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1321 UWORD8 swap_iq;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1322 UWORD32 task_tab= 0; //omaps00090550
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 #if (L1_FF_MULTIBAND == 0)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1325 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
1326 (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
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_band2;
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
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 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
1333 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1334 #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
1335
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1336 UWORD16 physical_band_id;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1337 physical_band_id =
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1338 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
1339 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
1340
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1341 #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
1342
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1343 switch(swap_iq)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1344 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1345 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
1346 case 2: /* DL, no 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 break;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1349 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
1350 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
1351 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
1352 task_tab |= 0x8000L;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1353 break;
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 return(task_tab);
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
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1358 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1359 /* l1s_swap_iq_ul() */
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 /* Parameters : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1362 /* Return : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1363 /* Functionality : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1364 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1365 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
1366 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1367 UWORD8 swap_iq;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1368 UWORD32 task_tab = 0; //omaps00090550
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1369
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1370 #if (L1_FF_MULTIBAND == 0)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1371
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1372 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
1373 (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
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_band2;
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
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 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
1380 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1381 #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
1382
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1383 UWORD16 physical_band_id = 0;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1384 physical_band_id =
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1385 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
1386 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
1387
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1388 #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
1389
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1390 switch(swap_iq)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1391 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1392 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
1393 case 1: /* UL, no 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 break;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1396 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
1397 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
1398 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
1399 task_tab |= 0x8000L;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1400 break;
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 return(task_tab);
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1403 }
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
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1406 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1407 /* l1s_ADC_decision_on_NP() */
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 /* Parameters : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1410 /* Return : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1411 /* Functionality : */
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 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
1414 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1415 UWORD8 adc_active = INACTIVE;
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 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
1418 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1419 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
1420 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1421 adc_active = ACTIVE;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1422 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
1423 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1424 else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1425 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1426 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
1427 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
1428 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1429 adc_active = ACTIVE;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1430 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
1431 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1432 }
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 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
1435 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1436 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
1437 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1438 adc_active = ACTIVE;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1439 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
1440 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1441 else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1442 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1443 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
1444 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
1445 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1446 adc_active = ACTIVE;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1447 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
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 return(adc_active);
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
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 #if (AMR == 1)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1456 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1457 /* l1s_amr_get_ratscch_type() */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1458 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1459 /* */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1460 /* Description: */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1461 /* ------------ */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1462 /* 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
1463 /* 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
1464 /* */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1465 /* Input parameter: */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1466 /* --------------- */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1467 /* "a_ratscch" */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1468 /* pointer to the RATSCCH block */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1469 /* */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1470 /* Output parameter: */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1471 /* ---------------- */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1472 /* Type of RATSCCH block. */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1473 /* Can be: C_RATSCCH_UNKNOWN */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1474 /* C_RATSCCH_CMI_PHASE_REQ */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1475 /* 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
1476 /* 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
1477 /* 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
1478 /* C_RATSCCH_THRES_REQ */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1479 /* */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1480 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1481 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
1482 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1483 // 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
1484 // -> 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
1485 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
1486 ((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
1487 ((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
1488 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1489 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
1490 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1491
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1492 // 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
1493 // -> 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
1494 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
1495 ((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
1496 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1497 return C_RATSCCH_THRES_REQ;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1498 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1499
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1500 // 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
1501 // -> 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
1502 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
1503 ((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
1504 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1505 // 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
1506 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
1507 UWORD8 nb_coders,i;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1508
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1509 // Count number of active coders
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1510 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
1511 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1512 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
1513 ratscch_acs >>= 1;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1514 }
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 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
1517 if(nb_coders<=3)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1518 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
1519
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1520 // 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
1521 // 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
1522 // -> 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
1523 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
1524 ((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
1525 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
1526 else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1527 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
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 // Block is not recognized
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1531 return C_RATSCCH_UNKNOWN;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1532 }
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 /*--------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1536 /* l1s_amr_update_from_ratscch() */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1537 /*--------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1538 /* */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1539 /* Description: */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1540 /* ------------ */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1541 /* 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
1542 /* 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
1543 /* 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
1544 /* (aset pointer). */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1545 /* 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
1546 /* */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1547 /* Input parameter: */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1548 /* --------------- */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1549 /* "a_ratscch_dl" */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1550 /* pointer to the RATSCCH block */
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 /* Output parameter: */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1553 /* ---------------- */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1554 /* n/a */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1555 /* */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1556 /*--------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1557 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
1558 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1559 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
1560 UWORD16 amr_change_bitmap=0;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1561 UWORD8 ratscch_type;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1562 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
1563
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1564 // 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
1565 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
1566
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1567 // 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
1568 switch(ratscch_type)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1569 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1570 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
1571 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1572 // Copy CMIP to L1 structure
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1573 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
1574 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
1575 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
1576 // AMR parameters update flag
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1577 ratscch_unknown=FALSE;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1578 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1579 break;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1580 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
1581 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1582 // Copy ACS to L1 structure
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1583 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
1584 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
1585 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
1586
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1587 // Copy ICM to L1 structure
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1588 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
1589 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
1590 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
1591
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1592 // 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
1593 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
1594 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
1595 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
1596
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1597 // 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
1598 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
1599 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
1600 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
1601
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1602 // 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
1603 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
1604 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
1605 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
1606
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1607 // 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
1608 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
1609 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
1610 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
1611 // AMR parameters update flag
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1612 ratscch_unknown=FALSE;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1613 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1614 break;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1615 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
1616 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1617 // Copy ACS to L1 structure
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1618 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
1619 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
1620 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
1621
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1622 // Copy ICM to L1 structure
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1623 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
1624 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
1625 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
1626
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1627 // 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
1628 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
1629 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
1630 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
1631
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1632 // 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
1633 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
1634 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
1635 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
1636
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1637 // 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
1638 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
1639 ((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
1640 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
1641 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
1642
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1643 // 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
1644 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
1645 hysteresis2 = hysteresis3 = hysteresis1;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1646 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
1647 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
1648 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
1649 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
1650 // AMR parameters update flag
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1651 ratscch_unknown=FALSE;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1652 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1653 break;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1654 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
1655 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1656 // Copy ACS to L1 structure
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1657 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
1658 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
1659 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
1660
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1661 // Copy ICM to L1 structure
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1662 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
1663 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
1664 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
1665 // AMR parameters update flag
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1666 ratscch_unknown=FALSE;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1667 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1668 break;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1669 case C_RATSCCH_THRES_REQ:
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1670 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1671 // 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
1672 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
1673 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
1674 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
1675
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1676 // 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
1677 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
1678 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
1679 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
1680
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1681 // 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
1682 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
1683 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
1684 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
1685
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1686 // 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
1687 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
1688 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
1689 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
1690
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1691 // 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
1692 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
1693 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
1694 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
1695
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1696 // 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
1697 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
1698 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
1699 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
1700 // AMR parameters update flag
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1701 ratscch_unknown=FALSE;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1702 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1703 break;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1704 case C_RATSCCH_UNKNOWN:
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1705 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1706 // No AMR parameters update
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1707 ratscch_unknown=TRUE;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1708 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1709 break;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1710 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1711 // 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
1712 if(ratscch_unknown==FALSE)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1713 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1714 // 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
1715 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
1716
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1717 #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
1718 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
1719 #endif
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 #endif // AMR
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1724
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1725
101
a103d40accc2 l1_func.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 100
diff changeset
1726 /*
a103d40accc2 l1_func.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 100
diff changeset
1727 * FreeCalypso TCS211 reconstruction: the following l1_memcpy_16bit()
a103d40accc2 l1_func.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 100
diff changeset
1728 * function has been moved to l1_dyn_dwl_func.c.
a103d40accc2 l1_func.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 100
diff changeset
1729 */
100
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1730
101
a103d40accc2 l1_func.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 100
diff changeset
1731 #if 0
100
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 /* l1_memcpy_16bit() */
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 /* */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1736 /* Description: */
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 /* 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
1739 /* 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
1740 /* destination */
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 /* Input parameter: */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1743 /* --------------- */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1744 /* "src" - input pointer */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1745 /* "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
1746 /* */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1747 /* Output parameter: */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1748 /* ---------------- */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1749 /* "dst" - output pointer */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1750 /* */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1751 /*--------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1752 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
1753 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1754 unsigned int i;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1755 unsigned int tempLen;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1756 unsigned char *cdst,*csrc;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1757 unsigned short *ssrc,*sdst;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1758
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1759 cdst=dst;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1760 csrc=src;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1761 sdst=dst;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1762 ssrc=src;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1763
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1764 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
1765 // 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
1766 // in 8-bit
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1767 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
1768 *cdst++=*csrc++;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1769 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1770 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1771 else{
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1772 // 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
1773 // in 16-bits
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1774 tempLen = len>>1;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1775 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
1776 *sdst++ = *ssrc++;
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 if(len & 0x1){
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1779 // 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
1780 cdst=(unsigned char*)sdst;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1781 csrc=(unsigned char*)ssrc;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1782 *cdst++ = *csrc++;
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 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1785 return;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1786 }
101
a103d40accc2 l1_func.c: passes compilation, object diffing begins
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 100
diff changeset
1787 #endif
100
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1788
102
334789c5338c l1_func.c: l1s_restore_synchro() removed - not applicable to our config
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 101
diff changeset
1789 #if (FF_L1_FAST_DECODING == 1)
100
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 /* l1s_restore_synchro */
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 /* Description: */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1794 /* ------------ */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1795 /* 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
1796 /* using synchro/synchro back scheme. */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1797 /* */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1798 /* Input parameters: */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1799 /* ----------------- */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1800 /* None */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1801 /* */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1802 /* Input parameters from globals: */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1803 /* ------------------------------ */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1804 /* l1s.tpu_offset */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1805 /* l1s.next_time */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1806 /* l1s.next_plus_time */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1807 /* */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1808 /* Output parameters: */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1809 /* ------------------ */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1810 /* None */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1811 /* */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1812 /* Modified parameters from globals: */
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 /* l1s.actual_time */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1815 /* l1s.next_time */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1816 /* l1s.next_plus_time */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1817 /* l1s.tpu_ctrl_reg */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1818 /* l1s.dsp_ctrl_reg */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1819 /*-----------------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1820 void l1s_restore_synchro(void)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1821 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1822 // 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
1823 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
1824
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1825 // Increment frame number.
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1826 #if L1_GPRS
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1827 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
1828 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
1829 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
1830 #else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1831 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
1832 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
1833 #endif
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 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
1836 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
1837
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1838 #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
1839 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
1840 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1841 }
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 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
1844 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1845 /* 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
1846 - Fast decoding is not authorized
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1847 - 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
1848 - 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
1849
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1850 /* Running from fast API HISR? */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1851 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
1852
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1853 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
1854 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1855 /* 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
1856 return TRUE;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1857 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1858 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
1859 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1860 /* 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
1861 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
1862 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
1863 /* 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
1864 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
1865 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1866 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
1867 return TRUE;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1868 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1869 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1870 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
1871 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1872 /* 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
1873 /* 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
1874
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1875 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
1876 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1877 /* 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
1878 /* 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
1879 /* 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
1880 /* 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
1881 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
1882 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1883 else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1884 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1885 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
1886 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1887 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
1888 return FALSE;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1889 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1890 /* 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
1891 return FALSE;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1892 } /* 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
1893
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1894 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
1895 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1896 BOOL result = FALSE;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1897
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1898 /* 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
1899 /* 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
1900 /* 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
1901 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
1902 || (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
1903 || (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
1904
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1905 /* 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
1906 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
1907 (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
1908 && (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
1909 && (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
1910 && (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
1911 && (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
1912 && (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
1913 && (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
1914 //&& (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
1915 && (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
1916 #if (L1_GPRS)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1917 && (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
1918 && (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
1919 && (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
1920 && (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
1921 #endif /* L1_GPRS */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1922 //&& (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
1923 #if (L1_MP3 == 1)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1924 && (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
1925 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1926 #if (L1_AAC == 1)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1927 && (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
1928 #endif
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
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1931 /* 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
1932 /* 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
1933 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
1934 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1935 return FALSE;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1936 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1937
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1938 switch(task)
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 case NP:
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 /* 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
1943 if ( ( already_in_progress == TRUE )
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 ( (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
1946 && (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
1947 && (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
1948 )
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 result = TRUE;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1951 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1952 break;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1953 } /* case NP */
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 case NBCCHS:
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 /* 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
1958 if ( ( already_in_progress == TRUE )
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 ( (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
1961 && (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
1962 && (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
1963 )
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1964 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1965 result = TRUE;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1966 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1967 break;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1968 } /* case NBCCHS */
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 #if (L1_GPRS)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1971 case PNP:
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1972 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1973 /* 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
1974 if ( ( already_in_progress == TRUE )
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1975 ||
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1976 ( (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
1977 && (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
1978 && (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
1979 )
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1980 )
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1981 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1982 result = TRUE;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1983 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1984 break;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1985 } /* case PNP */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1986 #endif /* L1_GPRS*/
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 } /* switch(task) */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1989
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1990 #if (L1_GPRS)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1991 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
1992 #else /* NO_GPRS*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1993 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
1994 #endif /* L1_GPRS */
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 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
1997 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1998
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
1999 return result;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2000 } /* 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
2001
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2002 #endif /* FF_L1_FAST_DECODING */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2003 /*-----------------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2004 /* l1s_check_sacch_dl_block */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2005 /*-----------------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2006 /* Description: */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2007 /* ------------ */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2008 /* 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
2009 /* 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
2010 /* 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
2011 /* is updated. */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2012 /* */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2013 /* Input parameters: */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2014 /* ----------------- */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2015 /* 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
2016 /* */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2017 /* Output parameters: */
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 /* None */
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 /*-----------------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2022 #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
2023
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2024 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
2025 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2026 int i,j,repeat=1;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2027 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
2028 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2029 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
2030 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2031 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
2032 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2033 break;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2034 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2035 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2036 if( i != 15 )
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2037 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2038 repeat=0;
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 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2041 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
2042 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2043 repeat=0;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2044 } /* 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
2045 if(repeat == 0)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2046 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2047 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
2048 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
2049 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2050 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
2051 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2052 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
2053 } /* end if repeat = 0*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2054 else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2055 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2056 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
2057 } /* end else repeat = 1*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2058 } /* 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
2059 #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
2060
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 /*-----------------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2063 /* l1s_store_sacch_buffer */
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 /* Description: */
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 /* 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
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 /* Input parameters: */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2071 /* ----------------- */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2072 /* 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
2073 /* 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
2074 /* */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2075 /* Output parameters: */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2076 /* ------------------ */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2077 /* None */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2078 /* */
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
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2081 #if (FF_REPEATED_SACCH == 1 )
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2082 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
2083 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2084 int i=0;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2085 /* 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
2086 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
2087 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2088 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
2089 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2090 repeat_sacch->buffer_empty = FALSE;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2091 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2092 #endif /* (FF_REPEATED_SACCH == 1 ) */
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 /*-----------------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2096 /* l1s_repeated_facch_check */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2097 /*-----------------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2098 /* Description: */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2099 /* ------------ */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2100 /* 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
2101 /* 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
2102 /* data. */
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 /* Input parameters: */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2106 /* ----------------- */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2107 /* "FACCH block to be stored" */
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 /* Output parameters: */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2110 /* ------------------ */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2111 /* None */
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 /*-----------------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2114
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 #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
2117 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
2118 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2119 unsigned int repeat=1;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2120 unsigned int i,j;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2121 UWORD8 counter_candidate;
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 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
2124 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
2125 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2126 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
2127 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2128 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
2129 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2130 break;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2131 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2132 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2133 if( i != 15 )
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 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2138 else
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 repeat=0;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2141 } /* end else buffer empty*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2142 #if TESTMODE
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2143 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
2144 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2145 repeat = 0;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2146 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2147 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2148 if(repeat == 0)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2149 {
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 else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2153 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2154 #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
2155 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
2156 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2157 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
2158 return (API)NULL;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2159 else
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2160 return &info_address[0];
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2161 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2162 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2163 #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
2164
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2165
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 #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
2168 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
2169 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2170 int i;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2171 UWORD8 counter_candidate;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2172 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
2173 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
2174 /* 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
2175 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
2176 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2177 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
2178 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2179 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
2180 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2181 #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
2182
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2183 #if(L1_FF_MULTIBAND == 1)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2184
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2185 #if 0
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2186
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2187 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2188 /* 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
2189 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2190 /* 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
2191 /* */
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 /* */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2194 /* 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
2195 /* is located radio_freq */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2196 /* 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
2197 /* 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
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 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2201 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
2202 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2203 UWORD8 effective_band_id = 0;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2204 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
2205 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2206 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
2207 && (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
2208
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2209 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2210 return(effective_band_id);
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2211 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2212 else
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 effective_band_id ++;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2215 }
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 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
2218 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2219 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
2220 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2221 return(effective_band_id);
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2222
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2223 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2224 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2225 /* 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
2226 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2227 /* 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
2228 /* */
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 /* */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2231 /* 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
2232 /* radio_freq is located */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2233 /* 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
2234 /* 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
2235 /* 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
2236 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2237
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2238 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
2239 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2240 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
2241 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
2242 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
2243 return(physical_band_id);
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2244 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2245
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2246 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2247 /* 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
2248 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2249 /* 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
2250 /* */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2251 /* */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2252 /* */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2253 /* 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
2254 /* 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
2255 /* 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
2256 /* 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
2257 /*-------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2258 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
2259 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2260 UWORD8 effective_band_id;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2261 UWORD16 operative_radio_freq;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2262 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
2263 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
2264 return(operative_radio_freq);
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2265 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2266 /*--------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2267 /* 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
2268 /*--------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2269 /* Parameters : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2270 /* 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
2271 /* */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2272 /* 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
2273 /* corresponding to radio_freq */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2274 /* Functionality :identify physical_band_id */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2275 /* 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
2276 /* 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
2277 /* 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
2278 /*--------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2279 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
2280 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2281 UWORD8 tpu_table_index = 0;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2282 UWORD8 physical_band_id = 0;
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2283 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
2284 /*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
2285 /*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
2286 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
2287 return(tpu_table_index);
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 /*--------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2290 /* l1_multiband_error_handler */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2291 /*--------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2292 /* Parameters : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2293 /* 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
2294 /* */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2295 /* Return : */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2296 /* corresponding to radio_freq */
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2297 /* 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
2298 /*--------------------------------------------------------*/
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2299 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
2300 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2301 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
2302 #if (OP_L1_STANDALONE == 1)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2303 #if(CODE_VERSION == NOT_SIMULATION)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2304 L1BSP_error_handler();
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2305 #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
2306 #endif
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 // if 0
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2309 #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
2310
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2311 #if (OP_L1_STANDALONE == 1)
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2312
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2313 UWORD8 l1_get_pwr_mngt()
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 return(l1_config.pwr_mngt);
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2316 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2317
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2318 #endif
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2319
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2320 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
2321 {
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2322 while(1);
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2323 }
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2324
ba58ce852caf l1_func.c: initial import of LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
2325