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