annotate chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_init.c @ 35:e64cc501383c

l1_async.c compiles
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Wed, 28 Oct 2015 03:00:06 +0000
parents 26666ef41058
children 3fca27cfa433
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
114 /* Init Dynamic Download NDB */
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
115 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
116 #if (CODE_VERSION == SIMULATION)
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
117 {
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
118 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
119 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
120 }
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
121 #endif // CODE_VERSION == SIMULATION
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
122
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
123 /* Init Dynamic Download DSP background */
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->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
125 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
126
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
127 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
128 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
129
26666ef41058 l1_dyn_dwl_init.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 19
diff changeset
130 dyn_dwnld_copy_MCU_vect[0] = gprs_patch_array;
26666ef41058 l1_dyn_dwl_init.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 19
diff changeset
131 dyn_dwnld_copy_MCU_vect[1] = amr_sch_patch_array;
26666ef41058 l1_dyn_dwl_init.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 19
diff changeset
132 #if (L1_GTT == 1)
26666ef41058 l1_dyn_dwl_init.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 19
diff changeset
133 dyn_dwnld_copy_MCU_vect[2] = tty_patch_array;
19
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
134 #endif
24
26666ef41058 l1_dyn_dwl_init.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 19
diff changeset
135 #if (MELODY_E2 == 1)
26666ef41058 l1_dyn_dwl_init.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 19
diff changeset
136 dyn_dwnld_copy_MCU_vect[3] = amr_mms_patch_array;
26666ef41058 l1_dyn_dwl_init.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 19
diff changeset
137 dyn_dwnld_copy_MCU_vect[4] = e2_patch_array;
26666ef41058 l1_dyn_dwl_init.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 19
diff changeset
138 #endif
19
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
139
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
140 for(i=0;i<MAX_NUM_OF_PATCH_IDS;i++)
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
141 {
24
26666ef41058 l1_dyn_dwl_init.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 19
diff changeset
142 if (dyn_dwnld_copy_MCU_vect[i] != 0)
26666ef41058 l1_dyn_dwl_init.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 19
diff changeset
143 {
19
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
144 l1_set_dyn_dwnld_install_vect(size_vect,dyn_dwnld_address_vect,dyn_dwnld_crc_vect,dyn_dwnld_copy_MCU_vect[i],i);
24
26666ef41058 l1_dyn_dwl_init.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 19
diff changeset
145 }
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
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
148 /*---------- 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
149 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
150 l1a.dyn_dwnld.melody1_E2_flag_activated = FALSE;
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
151 l1a.dyn_dwnld.state = 0;
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
152
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
153
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
154 l1a.dyn_dwnld.num_patches_installed = 0;
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
155
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
156 l1a.dyn_dwnld.patch_id[0] = 0xFFFF; //omaps00090550
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
157
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
158 /**************************************************/
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
159
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
160 // 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
161 l1a.dyn_dwnld.num_of_primitives = 2;
26666ef41058 l1_dyn_dwl_init.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 19
diff changeset
162 #if (L1_GTT == 1)
19
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
163 l1a.dyn_dwnld.num_of_primitives++;
24
26666ef41058 l1_dyn_dwl_init.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 19
diff changeset
164 #endif // L1_GTT
26666ef41058 l1_dyn_dwl_init.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 19
diff changeset
165 #if (MELODY_E2 == 1)
26666ef41058 l1_dyn_dwl_init.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 19
diff changeset
166 // Two primitives for MELODY E2
26666ef41058 l1_dyn_dwl_init.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 19
diff changeset
167 // FreeCalypso: apparently there are 3 in TCS211
26666ef41058 l1_dyn_dwl_init.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 19
diff changeset
168 l1a.dyn_dwnld.num_of_primitives += 3;
26666ef41058 l1_dyn_dwl_init.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 19
diff changeset
169 #endif // MELODY_E2
19
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
170
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
171 for (i=l1a.dyn_dwnld.num_patches_installed;i<MAX_NUM_OF_PATCH_IDS;i++)
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 l1a.dyn_dwnld.patch_id[i] = 0xFFFF; //omaps00090550 ;
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
174 l1a.dyn_dwnld.next_patch_id[i] = 0xFFFF; //omaps00090550 ;
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
175 }
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
176 for (i=0;i<MAX_NUM_OF_SEMAPHORES;i++)
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
177 l1a.dyn_dwnld.semaphore_vect[i] = GREEN;
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
178
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
179
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
180 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
181 for (i=0;i<MAX_NUM_OF_PATCH_IDS;i++)
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
182 l1a.dyn_dwnld.waiting_patch_fifo.signal_code_vect[i] = 0;
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
183
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
184 /*---------------------------------------------------------------------*/
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 /*---------- 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
187
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
188 l1s.dyn_dwnld_state=0;
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
189
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
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 /* 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
194 /* 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
195 /* 1 -> 16 bits mode */
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
196
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
197 #if (CODE_VERSION != SIMULATION)
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
198 (*(volatile UWORD16 *) 0xFFFFFB0E) |= 0x0020;
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
199 #endif // CODE_VERSION != SIMULATION
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
200 }
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
201
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
202 /*-------------------------------------------------------*/
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
203 /* l1_dyn_dwl_reset() */
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 /* Parameters : none */
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
207 /* Return : nothing */
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
208 /* Functionality : Reset Dynamic Download variables */
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
209 /* */
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
210 /*-------------------------------------------------------*/
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
211
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
212 void l1_dyn_dwnld_reset()
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 UWORD8 indx_loop;
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
215
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
216 /* Reset L1A-L1S commands */
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
217 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
218 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
219
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
220 /* Reset L1A-API HISR commands */
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
221
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
222 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
223 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
224
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
225 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
226 {
24
26666ef41058 l1_dyn_dwl_init.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 19
diff changeset
227 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
228 = 0;
26666ef41058 l1_dyn_dwl_init.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 19
diff changeset
229 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
230 = 0;
26666ef41058 l1_dyn_dwl_init.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 19
diff changeset
231 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
232 = 0;
26666ef41058 l1_dyn_dwl_init.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 19
diff changeset
233 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
234 = 0;
19
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
235 }
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
236
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
237 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
238 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
239 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
240
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
241 /* Reset global API HISR variable */
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
242 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
243 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
244 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
245 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
246 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
247 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
248
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
249 /* 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
250 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
251 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
252 {
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.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
254 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
255 }
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
256 }
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
257
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 /* l1_dyn_dwnld_reset_api() */
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 /* Parameters : none */
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
262 /* Return : nothing */
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
263 /* 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
264 /* */
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
265 /*---------------------------------------------------------------------*/
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
266 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
267 {
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
268 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
269 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
270 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
271 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
272 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
273 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
274 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
275 }
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
276
06d94fdaadf6 l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 15
diff changeset
277 #endif // L1_DYN_DSP_DWNLD