FreeCalypso > hg > freecalypso-sw
annotate gsm-fw/L1/dyn_dwl_cfile/l1_dyn_dwl_init.c @ 987:7a55a3eb985a
doc: Compal-unlock and TFC139-breakin articles updated for the new tfc139 tool
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Sat, 12 Dec 2015 08:24:08 +0000 |
parents | 48969469d961 |
children |
rev | line source |
---|---|
925
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 /************* Revision Controle System Header ************* |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 * GSM Layer 1 software |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 * L1_DYN_DWL_INIT.C |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 * |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 * Filename l1_dyn_dwl_init.c |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 * Copyright 2004 (C) Texas Instruments |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 * |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 ************* Revision Controle System Header *************/ |
927
48969469d961
gsm-fw: l1_dyn_dwl code compiles and links
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
925
diff
changeset
|
9 #include "config.h" |
925
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 #include "l1_confg.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 #include "sys_types.h" |
927
48969469d961
gsm-fw: l1_dyn_dwl code compiles and links
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
925
diff
changeset
|
12 #include "../../riviera/rv/rv_general.h" |
48969469d961
gsm-fw: l1_dyn_dwl code compiles and links
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
925
diff
changeset
|
13 #include "../../nucleus/nucleus.h" |
925
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 #include "l1_types.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 #include "l1audio_const.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 #include "l1audio_cust.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 #include "l1audio_defty.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 #include "l1_const.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 #include "l1tm_defty.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 #if (L1_GTT == 1) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 #include "l1gtt_const.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 #include "l1gtt_defty.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 #endif |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
25 #if (L1_DYN_DSP_DWNLD == 1) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 #include "l1_dyn_dwl_const.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 #include "l1_dyn_dwl_defty.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 #include "l1_dyn_dwl_proto.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 #endif |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
30 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 #if (L1_MP3 == 1) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 #include "l1mp3_defty.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
33 #endif //L1_MP3 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 #if (L1_MIDI == 1) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
35 #include "l1midi_defty.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
36 #endif |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
37 #if (L1_AAC == 1) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
38 #include "l1aac_defty.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
39 #endif //L1_AAC |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
40 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
41 #include "l1_defty.h" |
927
48969469d961
gsm-fw: l1_dyn_dwl code compiles and links
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
925
diff
changeset
|
42 #include "../../gpf/inc/cust_os.h" |
925
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
43 /* #include "nu_main.h" */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
44 #include "l1audio_signa.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
45 #include "l1_varex.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
46 #include "l1_macro.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
47 #include "l1_trace.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
48 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
49 #if (L1_DYN_DSP_DWNLD == 1) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
50 extern T_DYN_DWNLD_MCU_DSP *dyn_dwl_ndb; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
51 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
52 /* reconstructing from disassembly of TCS211 binary object */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
53 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
54 /* patch ID mapping: |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
55 0 = GPRS |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
56 1 = AMR_SCH |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
57 2 = TTY |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
58 3 = AMR_MMS |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
59 4 = E2 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
60 */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
61 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
62 const BOOL primitives_to_patch_matrix[NUM_OF_DYN_DWNLD_PRIMITIVES][MAX_NUM_OF_PATCH_IDS] = { |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
63 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
64 /* L1C_STOP_DEDICATED_DONE */ {1, 0, 0, 0, 0}, |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
65 /* MMI_GTT_START_REQ (?) */ {0, 0, 1, 0, 0}, |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
66 /* MPHC_IMMED_ASSIGN_REQ */ {0, 1, 0, 0, 0}, |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
67 /* MMI_MELODY0_E2_START_REQ */ {0, 0, 0, 0, 1}, |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
68 /* MMI_MELODY1_E2_START_REQ */ {0, 0, 0, 0, 1}, |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
69 /* L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_CON */ {0, 0, 0, 1, 0} |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
70 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
71 }; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
72 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
73 const BOOL incompatibility_matrix[MAX_NUM_OF_PATCH_IDS][MAX_NUM_OF_PATCH_IDS] ={ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
74 {0, 1, 1, 0, 0}, |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
75 {1, 0, 0, 0, 0}, |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
76 {0, 0, 0, 1, 1}, |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
77 {0, 0, 1, 0, 1}, |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
78 {0, 0, 1, 1, 0}, |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
79 }; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
80 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
81 const BOOL semaphore_matrix[MAX_NUM_OF_PATCH_IDS][MAX_NUM_OF_SEMAPHORES] = { |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
82 {0, 0, 0, 0, 0, 1}, |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
83 {1, 0, 0, 0, 0, 1}, |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
84 {0, 1, 0, 0, 0, 1}, |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
85 {0, 0, 0, 1, 1, 1}, |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
86 {0, 0, 1, 0, 0, 1}, |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
87 }; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
88 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
89 UWORD32 dyn_dwnld_address_vect[MAX_NUM_OF_PATCH_IDS]; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
90 UWORD16 dyn_dwnld_crc_vect[MAX_NUM_OF_PATCH_IDS]; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
91 UWORD16 size_vect[MAX_NUM_OF_PATCH_IDS]; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
92 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
93 UWORD8 const *dyn_dwnld_copy_MCU_vect[MAX_NUM_OF_PATCH_IDS]; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
94 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
95 extern const UWORD8 amr_mms_patch_array[]; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
96 extern const UWORD8 amr_sch_patch_array[]; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
97 extern const UWORD8 e2_patch_array[]; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
98 extern const UWORD8 gprs_patch_array[]; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
99 extern const UWORD8 speech_acoustic_patch_array[]; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
100 extern const UWORD8 tty_patch_array[]; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
101 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
102 /*-------------------------------------------------------*/ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
103 /* l1_dyn_dwnld_initialize_var() */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
104 /*-------------------------------------------------------*/ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
105 /* Parameters : none */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
106 /* Return : nothing */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
107 /* Functionality : Initialize Dynamic Download variables */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
108 /* */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
109 /*-------------------------------------------------------*/ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
110 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
111 void l1_dyn_dwnld_initialize_var() |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
112 { |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
113 UWORD16 i; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
114 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
115 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
116 /* Init Dynamic Download NDB */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
117 dyn_dwl_ndb=(T_DYN_DWNLD_MCU_DSP *)API_address_dsp2mcu(C_DYN_DWNLD_API_BASE_ADDRESS); |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
118 #if (CODE_VERSION == SIMULATION) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
119 { |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
120 extern T_DYN_DWNLD_MCU_DSP dyn_dwl_ndb_sim; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
121 dyn_dwl_ndb=&dyn_dwl_ndb_sim; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
122 } |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
123 #endif // CODE_VERSION == SIMULATION |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
124 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
125 /* Init Dynamic Download DSP background */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
126 l1s_dsp_com.dsp_ndb_ptr->a_background_tasks[C_BGD_DSP_DYN_DWNLD] = (API)((C_BGD_DSP_DYN_DWNLD<<11) | 0); |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
127 l1s_dsp_com.dsp_ndb_ptr->d_background_enable&=(API)(~(1<<C_BGD_DSP_DYN_DWNLD)); |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
128 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
129 if(l1s_dsp_com.dsp_ndb_ptr->d_max_background<(C_BGD_DSP_DYN_DWNLD+1)) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
130 l1s_dsp_com.dsp_ndb_ptr->d_max_background=(API)(C_BGD_DSP_DYN_DWNLD+1); |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
131 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
132 dyn_dwnld_copy_MCU_vect[0] = gprs_patch_array; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
133 dyn_dwnld_copy_MCU_vect[1] = amr_sch_patch_array; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
134 #if (L1_GTT == 1) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
135 dyn_dwnld_copy_MCU_vect[2] = tty_patch_array; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
136 #endif |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
137 #if (MELODY_E2 == 1) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
138 dyn_dwnld_copy_MCU_vect[3] = amr_mms_patch_array; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
139 dyn_dwnld_copy_MCU_vect[4] = e2_patch_array; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
140 #endif |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
141 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
142 for(i=0;i<MAX_NUM_OF_PATCH_IDS;i++) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
143 { |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
144 if (dyn_dwnld_copy_MCU_vect[i] != 0) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
145 { |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
146 l1_set_dyn_dwnld_install_vect(size_vect,dyn_dwnld_address_vect,dyn_dwnld_crc_vect,dyn_dwnld_copy_MCU_vect[i],i); |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
147 } |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
148 } |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
149 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
150 /*---------- Set L1A globals at phone init ----------------------------*/ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
151 l1a.dyn_dwnld.melody0_E2_flag_activated = FALSE; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
152 l1a.dyn_dwnld.melody1_E2_flag_activated = FALSE; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
153 l1a.dyn_dwnld.state = 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
154 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
155 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
156 l1a.dyn_dwnld.num_patches_installed = 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
157 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
158 l1a.dyn_dwnld.patch_id[0] = 0xFFFF; //omaps00090550 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
159 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
160 /**************************************************/ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
161 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
162 // Compute number of current primitives defined via compilation switch |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
163 l1a.dyn_dwnld.num_of_primitives = 2; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
164 #if (L1_GTT == 1) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
165 l1a.dyn_dwnld.num_of_primitives++; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
166 #endif // L1_GTT |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
167 #if (MELODY_E2 == 1) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
168 // Two primitives for MELODY E2 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
169 // FreeCalypso: apparently there are 3 in TCS211 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
170 l1a.dyn_dwnld.num_of_primitives += 3; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
171 #endif // MELODY_E2 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
172 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
173 for (i=l1a.dyn_dwnld.num_patches_installed;i<MAX_NUM_OF_PATCH_IDS;i++) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
174 { |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
175 l1a.dyn_dwnld.patch_id[i] = 0xFFFF; //omaps00090550 ; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
176 l1a.dyn_dwnld.next_patch_id[i] = 0xFFFF; //omaps00090550 ; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
177 } |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
178 for (i=0;i<MAX_NUM_OF_SEMAPHORES;i++) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
179 l1a.dyn_dwnld.semaphore_vect[i] = GREEN; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
180 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
181 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
182 l1a.dyn_dwnld.waiting_patch_fifo.num_of_elem = 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
183 for (i=0;i<MAX_NUM_OF_PATCH_IDS;i++) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
184 l1a.dyn_dwnld.waiting_patch_fifo.signal_code_vect[i] = 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
185 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
186 /*---------------------------------------------------------------------*/ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
187 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
188 /*---------- Set L1S globals at phone init ----------------------------*/ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
189 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
190 l1s.dyn_dwnld_state=0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
191 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
192 /*---------------------------------------------------------------------*/ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
193 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
194 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
195 /* Set API ACCESS bit to 16 bits mode */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
196 /* Bit 5: 0 -> 32 bits mode */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
197 /* 1 -> 16 bits mode */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
198 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
199 #if (CODE_VERSION != SIMULATION) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
200 (*(volatile UWORD16 *) 0xFFFFFB0E) |= 0x0020; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
201 #endif // CODE_VERSION != SIMULATION |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
202 } |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
203 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
204 /*-------------------------------------------------------*/ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
205 /* l1_dyn_dwl_reset() */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
206 /* */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
207 /*-------------------------------------------------------*/ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
208 /* Parameters : none */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
209 /* Return : nothing */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
210 /* Functionality : Reset Dynamic Download variables */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
211 /* */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
212 /*-------------------------------------------------------*/ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
213 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
214 void l1_dyn_dwnld_reset() |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
215 { |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
216 UWORD8 indx_loop; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
217 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
218 /* Reset L1A-L1S commands */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
219 l1a_l1s_com.dyn_dwnld_task.start = FALSE; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
220 l1a_l1s_com.dyn_dwnld_task.stop = FALSE; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
221 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
222 /* Reset L1A-API HISR commands */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
223 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
224 l1a_apihisr_com.dyn_dwnld.command.restart = FALSE; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
225 l1a_apihisr_com.dyn_dwnld.uninstall_parameters.num_of_elem = 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
226 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
227 for (indx_loop = 0 ; indx_loop < MAX_NUM_OF_PATCH_IDS ; indx_loop++ ) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
228 { |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
229 l1a_apihisr_com.dyn_dwnld.uninstall_parameters.address[indx_loop] |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
230 = 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
231 l1a_apihisr_com.dyn_dwnld.copy_parameters.start_MCU_copy_address[indx_loop] |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
232 = 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
233 l1a_apihisr_com.dyn_dwnld.copy_parameters.address_to_install[indx_loop] |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
234 = 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
235 l1a_apihisr_com.dyn_dwnld.copy_parameters.size_array[indx_loop] |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
236 = 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
237 } |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
238 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
239 l1a_apihisr_com.dyn_dwnld.copy_parameters.size_of_dwnld_area = 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
240 l1a_apihisr_com.dyn_dwnld.copy_parameters.start_of_dwnld_area = 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
241 l1a_apihisr_com.dyn_dwnld.copy_parameters.num_of_elem = 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
242 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
243 /* Reset global API HISR variable */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
244 l1_apihisr.dyn_dwnld.state = 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
245 l1_apihisr.dyn_dwnld.running = FALSE; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
246 l1_apihisr.dyn_dwnld.uninstall_counter = 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
247 l1_apihisr.dyn_dwnld.patch_ids_counter = 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
248 l1_apihisr.dyn_dwnld.running_source_pointer = 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
249 l1_apihisr.dyn_dwnld.tmp_patch_size = 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
250 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
251 /* Reset L1A global FIFO for handling the DELAY (when two or more primitives fall within a dynamic download time frame)*/ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
252 l1a.dyn_dwnld.waiting_patch_fifo.num_of_elem = 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
253 for (indx_loop=0;indx_loop<MAX_NUM_OF_PATCH_IDS;indx_loop++) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
254 { |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
255 l1a.dyn_dwnld.waiting_patch_fifo.signal_code_vect[indx_loop] = 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
256 l1a.dyn_dwnld.next_patch_id[indx_loop] = 0xFFFF; //omaps00090550 ; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
257 } |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
258 } |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
259 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
260 /*---------------------------------------------------------------------*/ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
261 /* l1_dyn_dwnld_reset_api() */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
262 /*---------------------------------------------------------------------*/ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
263 /* Parameters : none */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
264 /* Return : nothing */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
265 /* Functionality : Reset Dynamic Download API variables */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
266 /* */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
267 /*---------------------------------------------------------------------*/ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
268 void l1_dyn_dwnld_reset_api() |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
269 { |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
270 dyn_dwl_ndb->d_api_dwl_download_ctrl = (API) 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
271 dyn_dwl_ndb->d_api_dwl_error_code = (API) 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
272 dyn_dwl_ndb->d_api_dwl_function_address[0] = (API) 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
273 dyn_dwl_ndb->d_api_dwl_function_address[1] = (API) 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
274 dyn_dwl_ndb->d_api_dwl_crc = (API) 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
275 dyn_dwl_ndb->d_api_dwl_size = (API) 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
276 dyn_dwl_ndb->d_api_dwl_write_pointer = (API) 0; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
277 } |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
278 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
279 #endif // L1_DYN_DSP_DWNLD |