FreeCalypso > hg > tcs211-l1-reconst
annotate chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_afunc.c @ 21:0ec722728d69
signal_patch_array reconstructed from disassembly, l1_dyn_dwl_afunc.c compiles
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Wed, 21 Oct 2015 22:55:18 +0000 |
parents | 13c360a4885f |
children | 3358b8e6922f |
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_AFUNC.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_afunc.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 |
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 "l1_types.h" |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
12 #include "sys_types.h" |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
13 #include "cust_os.h" |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
14 #include "l1_macro.h" |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
15 #include "l1_const.h" |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
16 #if TESTMODE |
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 #endif |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
19 #if (AUDIO_TASK == 1) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
20 #include "l1audio_const.h" |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
21 #include "l1audio_cust.h" |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
22 #include "l1audio_defty.h" |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
23 #include "l1audio_signa.h" |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
24 #endif |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
25 #if (L1_GTT == 1) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
26 #include "l1gtt_const.h" |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
27 #include "l1gtt_defty.h" |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
28 #include "l1gtt_signa.h" |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
29 #endif |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
30 #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
|
31 #include "l1_dyn_dwl_msgty.h" |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
32 #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
|
33 #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
|
34 #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
|
35 #endif //L1_DYN_DSP_DWNLD |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
36 #if (L1_MP3 == 1) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
37 #include "l1mp3_signa.h" |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
38 #include "l1mp3_defty.h" |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
39 #endif //L1_MP3 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
40 #if (L1_MIDI == 1) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
41 #include "l1midi_defty.h" |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
42 #endif |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
43 #if (L1_AAC == 1) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
44 #include "l1aac_signa.h" |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
45 #include "l1aac_defty.h" |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
46 #endif //L1_AAC |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
47 #include "l1_defty.h" |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
48 #include "l1_varex.h" |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
49 #include "l1_msgty.h" |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
50 #include "l1_proto.h" |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
51 #include "l1_signa.h" |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
52 #include <string.h> |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
53 #include <stdio.h> |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
54 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
55 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
56 #if (TRACE_TYPE == 1) ||(TRACE_TYPE == 4) || (TRACE_TYPE == 7) || (TESTMODE) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
57 #include "l1_trace.h" |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
58 #endif |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
59 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
60 #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
|
61 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
62 extern const BOOL primitives_to_patch_matrix[][MAX_NUM_OF_PATCH_IDS]; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
63 extern const BOOL incompatibility_matrix[][MAX_NUM_OF_PATCH_IDS]; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
64 extern const BOOL semaphore_matrix[][MAX_NUM_OF_SEMAPHORES]; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
65 |
21
0ec722728d69
signal_patch_array reconstructed from disassembly, l1_dyn_dwl_afunc.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
20
diff
changeset
|
66 /* table reconstructed from disassembly of TCS211 binary object */ |
19
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
67 const T_SIGNAL_PATCH signal_patch_array[NUM_OF_DYN_DWNLD_PRIMITIVES] = |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
68 { |
21
0ec722728d69
signal_patch_array reconstructed from disassembly, l1_dyn_dwl_afunc.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
20
diff
changeset
|
69 {L1C_STOP_DEDICATED_DONE, 0}, |
0ec722728d69
signal_patch_array reconstructed from disassembly, l1_dyn_dwl_afunc.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
20
diff
changeset
|
70 {MPHC_IMMED_ASSIGN_REQ, 2}, |
0ec722728d69
signal_patch_array reconstructed from disassembly, l1_dyn_dwl_afunc.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
20
diff
changeset
|
71 {MMI_MELODY0_E2_START_REQ, 3}, |
0ec722728d69
signal_patch_array reconstructed from disassembly, l1_dyn_dwl_afunc.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
20
diff
changeset
|
72 {MMI_MELODY1_E2_START_REQ, 4}, |
0ec722728d69
signal_patch_array reconstructed from disassembly, l1_dyn_dwl_afunc.c compiles
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
20
diff
changeset
|
73 {L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_CON, 5}, |
19
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
74 }; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
75 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
76 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
77 /* l1_check_flag_for_download_area */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
78 /* Parameters : Signal Code of the message |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
79 // Return : none |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
80 // Description : Modify flag if needed to handle different download area when melody E2 is playing */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
81 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
82 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
83 void l1_check_flag_for_download_area(UWORD32 msg_code) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
84 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
85 switch(msg_code) |
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 #if (AUDIO_TASK == 1) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
88 #if (MELODY_E2 == 1) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
89 /* MELODY E2 case must be handled carefully: two melodies can be activated for E2: both trigger a dynamic download*/ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
90 /* When one of the two is requested, the corresponding flag used afterwards when it is stopped is set */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
91 case MMI_MELODY0_E2_START_REQ: |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
92 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
93 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
94 l1a.dyn_dwnld.melody0_E2_flag_activated = TRUE; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
95 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
96 break; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
97 case MMI_MELODY1_E2_START_REQ: |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
98 { |
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 l1a.dyn_dwnld.melody1_E2_flag_activated = TRUE; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
101 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
102 break; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
103 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
104 /* When E2 is stopped the activated flag must be reset */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
105 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
106 case L1_MELODY0_E2_STOP_CON: |
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 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
|
110 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
111 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
112 break; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
113 case L1_MELODY1_E2_STOP_CON: |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
114 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
115 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
116 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
|
117 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
118 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
119 break; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
120 #endif // MELODY_E2 == 1 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
121 #endif // AUDIO_TASK == 1 |
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 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
124 } |
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 /* l1_does_the_incoming_primitive_trigger_dynamic_dwnld */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
127 /*------------------------------------------------------------------------------------------------------------------- */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
128 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
129 /* Parameters : Signal Code of the message, delay flag */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
130 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
131 /* Return : TRUE if the primitive triggers a dynamic download, FALSE in the other case */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
132 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
133 /* Description : Check if the primitive triggers a dynamic download; if yes it return TRUE, otherwise FALSE */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
134 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
135 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
136 /*------------------------------------------------------------------------------------------------------------------- */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
137 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
138 BOOL l1_does_the_incoming_primitive_trigger_dynamic_dwnld(UWORD32 msg_code, BOOL delay_flag) |
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 BOOL return_flag = FALSE; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
141 UWORD16 i; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
142 for (i=0;i<l1a.dyn_dwnld.num_of_primitives;i++) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
143 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
144 if(msg_code == signal_patch_array[i].primitive) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
145 return_flag = TRUE; |
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 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
149 l1_check_flag_for_download_area(msg_code); |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
150 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
151 return return_flag; |
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 /*---------------------------------------------------------------------------------------- */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
155 /* l1_lookup_primitive_patch_matrix */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
156 /*---------------------------------------------------------------------------------------- */ |
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 /* Parameters : Signal Code of the message, patch_id vector */ |
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 /* Return : number of patches to download, patch ids vectore (by reference) */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
161 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
162 /* Description : Retrieves the patch ids to be downloaded and number of patches to download */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
163 /* Patch ID is retrieved via look-up in primitives to patch ID matrix */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
164 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
165 /*---------------------------------------------------------------------------------------- */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
166 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
167 UWORD16 l1_lookup_primitive_patch_matrix(UWORD32 msg_code, UWORD16* patch_id_p) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
168 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
169 UWORD16 j; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
170 UWORD16 counter=0; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
171 UWORD16 msg_code_id=0 ;//omaps00090550 |
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 // Check if one of the messages belongs to the set of primitves which triggers a dynamic download and saves its index |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
174 |
20
13c360a4885f
starting to compile l1_dyn_dwl_afunc.c
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
19
diff
changeset
|
175 #if 0 // LoCosto-ism not present in TCS211 |
19
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
176 if (!((l1a.state[L1A_GTT_STATE] == 0) || (l1a.state[L1A_GTT_STATE] == 1))) // TTY ON |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
177 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
178 if(msg_code == MMI_TCH_VOCODER_CFG_REQ) // AND Current_message == VOCODER |
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 // Dont do anything |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
181 return 0; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
182 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
183 } |
20
13c360a4885f
starting to compile l1_dyn_dwl_afunc.c
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
19
diff
changeset
|
184 #endif |
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 for (j=0;j<NUM_OF_DYN_DWNLD_PRIMITIVES;j++) |
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 if (msg_code == signal_patch_array[j].primitive) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
189 msg_code_id = signal_patch_array[j].msg_id; |
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 // Compute the number of elements to be downloaded and their ids |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
194 for (j=0; j<MAX_NUM_OF_PATCH_IDS; j++) |
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 patch_id_p[j]=0xFFFF; //omaps00090550 ; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
197 if(primitives_to_patch_matrix[msg_code_id][j] == 1) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
198 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
199 patch_id_p[counter++]=j; |
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 return counter; |
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_is_patch_already_installed */ |
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 : patch id */ |
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 /* Return : TRUE patch is already installed, FALSE otherwise */ |
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 /* Description : Check if the selected patch id is already installed or not*/ |
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 /* */ |
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 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
218 BOOL l1_is_patch_already_installed (UWORD16 patch_id) |
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 UWORD16 i=0; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
221 while(i<l1a.dyn_dwnld.num_patches_installed) |
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 if(l1a.dyn_dwnld.patch_id[i]==patch_id) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
224 break; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
225 else |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
226 i++; |
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 if(i<l1a.dyn_dwnld.num_patches_installed) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
229 return TRUE; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
230 else |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
231 return FALSE; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
232 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
233 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
234 /*----------------------------------------------------------------------------- */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
235 /* l1_is_patch_id_in_uninstall_set */ |
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 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
238 /* Parameters : patch id, uninstall address vector, num of uninstall elements */ |
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 /* Return : TRUE patch is in the set, FALSE otherwise */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
241 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
242 /* Description : Check if the selected patch id is in the uninstall set or not */ |
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 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
245 /*----------------------------------------------------------------------------- */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
246 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
247 BOOL l1_is_patch_id_in_uninstall_set (UWORD16 patch_id, UWORD16 *uninstall_patch_vect, UWORD16 num_of_uninstall_elem) |
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 UWORD16 i; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
250 for (i=0;i<num_of_uninstall_elem;i++) |
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 if(patch_id==uninstall_patch_vect[i]) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
253 return TRUE; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
254 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
255 return FALSE; |
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_manage_patch_incompatibilty */ |
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 /* Parameters : num of patch to download, num of uninstalled elements (pointer), uninstall vect */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
263 /* Return : TRUE if there is some patch to uninstall, FALSE otherwise. By reference, num of patches to uninstall and their IDs */ |
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 /* Description : Check if some patch must be uninstalled: in case, retrieves the number of patch to uninstall and their IDs */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
266 /* */ |
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 BOOL l1_manage_patch_incompatibilty(UWORD16 num_of_patch_id_to_dwnld, UWORD16 *num_of_uninstall_elem, UWORD16 *uninstall_patch_id_vect) |
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 UWORD16 i,j; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
272 UWORD16 patch_id; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
273 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
274 // Reset values passed by reference |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
275 *num_of_uninstall_elem=0; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
276 for(j=0;j<MAX_NUM_OF_PATCH_IDS;j++) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
277 uninstall_patch_id_vect[j]=0xFFFF; //omaps00090550 ; |
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 // First cycle: for all the patches that must be downloaded |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
280 for(i=0;i<num_of_patch_id_to_dwnld;i++) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
281 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
282 patch_id=l1a.dyn_dwnld.next_patch_id[i]; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
283 // Check all incompatibilities |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
284 for(j=0;j<MAX_NUM_OF_PATCH_IDS;j++) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
285 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
286 // If patch ID j is incompatible with selected patch id that must be downloaded |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
287 if(incompatibility_matrix[patch_id][j]==1) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
288 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
289 // If patch j is already installed and not yet in the uninstall set |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
290 if((l1_is_patch_already_installed(j) == TRUE) && (l1_is_patch_id_in_uninstall_set(j,uninstall_patch_id_vect,(*num_of_uninstall_elem))==FALSE)) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
291 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
292 // Add patch j in the uninstall set and increase number of uninstall elements |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
293 uninstall_patch_id_vect[*num_of_uninstall_elem]=j; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
294 (*num_of_uninstall_elem)++; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
295 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
296 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
297 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
298 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
299 if(*num_of_uninstall_elem==0) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
300 return TRUE; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
301 else |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
302 return FALSE; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
303 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
304 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
305 /*----------------------------------------------------------------- */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
306 /* l1_set_semaphores_for_all_state_machines_involved */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
307 /*----------------------------------------------------------------- */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
308 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
309 /* Parameters : num of patches to download, */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
310 /* Return : none */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
311 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
312 /* Description : Set semaphores for the state machines impacted */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
313 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
314 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
315 /*----------------------------------------------------------------- */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
316 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
317 void l1_set_semaphores_for_all_state_machines_involved(UWORD16 num_of_patch_id_to_dwnld, UWORD16* next_patch_id) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
318 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
319 UWORD16 i,j, patch_id; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
320 for (i=0;i<num_of_patch_id_to_dwnld;i++) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
321 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
322 patch_id = next_patch_id[i]; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
323 for(j=0;j<MAX_NUM_OF_SEMAPHORES;j++) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
324 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
325 if(semaphore_matrix[patch_id][j]==1) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
326 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
327 l1a.dyn_dwnld.semaphore_vect[j]=RED; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
328 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
329 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
330 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
331 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
332 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
333 /*----------------------------------------------------------------- */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
334 /* l1_update_semaphores_for_all_state_machines */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
335 /*----------------------------------------------------------------- */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
336 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
337 /* Parameters : num of patches to download, */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
338 /* Return : none */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
339 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
340 /* Description : Update semaphores for the state machines impacted */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
341 /* (DELAY case) */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
342 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
343 /*----------------------------------------------------------------- */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
344 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
345 void l1_update_semaphores_for_all_state_machines(UWORD16 num_of_patch_id_to_dwnld) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
346 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
347 /* In case of delay the patch which is DELAYED may have been be already installed*/ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
348 /* The semaphores that have been raised during the previous dynamic download */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
349 /* for that patch must be updated */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
350 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
351 UWORD16 i,j, patch_id; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
352 for(j=0;j<MAX_NUM_OF_SEMAPHORES;j++) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
353 l1a.dyn_dwnld.semaphore_vect[j] = GREEN; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
354 for (i=0;i<num_of_patch_id_to_dwnld;i++) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
355 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
356 patch_id = l1a.dyn_dwnld.next_patch_id[i]; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
357 for(j=0;j<MAX_NUM_OF_SEMAPHORES;j++) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
358 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
359 if(semaphore_matrix[patch_id][j]==1) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
360 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
361 l1a.dyn_dwnld.semaphore_vect[j]=RED; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
362 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
363 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
364 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
365 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
366 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
367 /*-------------------------------------------------------*/ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
368 /* l1_reset_semaphores */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
369 /*-------------------------------------------------------*/ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
370 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
371 /* Parameters : none */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
372 /* Return : */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
373 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
374 /* Description : Reset semaphores only for the state machines related to the currently downloaded patches */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
375 /* In fact, because of delay, some semaphores can be set for patch that will be downloaded in the follwoing step */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
376 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
377 /*-------------------------------------------------------*/ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
378 void l1_reset_semaphores() |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
379 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
380 UWORD16 i,j, patch_id; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
381 for (i=0;i<l1a.dyn_dwnld.num_of_elem_to_copy;i++) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
382 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
383 patch_id = l1a.dyn_dwnld.next_patch_id[i]; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
384 for(j=0;j<MAX_NUM_OF_SEMAPHORES;j++) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
385 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
386 if(semaphore_matrix[patch_id][j]==1) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
387 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
388 l1a.dyn_dwnld.semaphore_vect[j]=GREEN; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
389 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
390 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
391 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
392 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
393 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
394 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
395 /*---------------------------------------------------------- */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
396 /* l1_push_Primitive */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
397 /*---------------------------------------------------------- */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
398 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
399 /* Parameters : primitive ID */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
400 /* Return : TRUE if push is successful, FALSE otherwise */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
401 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
402 /* Description : Push primitive ID into DELAY FIFO */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
403 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
404 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
405 /*---------------------------------------------------------- */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
406 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
407 BOOL l1_push_Primitive(UWORD32 primitive_id) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
408 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
409 UWORD32 num_elem = l1a.dyn_dwnld.waiting_patch_fifo.num_of_elem; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
410 BOOL return_flag = TRUE; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
411 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
412 if(num_elem >= MAX_NUM_OF_PATCH_IDS) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
413 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
414 return_flag = FALSE; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
415 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
416 else |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
417 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
418 l1a.dyn_dwnld.waiting_patch_fifo.signal_code_vect[num_elem++] = primitive_id; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
419 l1a.dyn_dwnld.waiting_patch_fifo.num_of_elem = num_elem; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
420 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
421 return return_flag; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
422 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
423 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
424 /*---------------------------------------------------------- */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
425 /* l1_pop_Primitive */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
426 /*---------------------------------------------------------- */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
427 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
428 /* Parameters : primitive ID (pointer) */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
429 /* Return : TRUE if pop is successful, FALSE otherwise */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
430 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
431 /* Description : Pop primitive from DELAY FIFO */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
432 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
433 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
434 /*---------------------------------------------------------- */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
435 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
436 BOOL l1_pop_Primitive(UWORD32 *p_primitive) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
437 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
438 UWORD32 primitive_id; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
439 UWORD8 ind; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
440 UWORD32 num_elem = l1a.dyn_dwnld.waiting_patch_fifo.num_of_elem; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
441 BOOL return_flag = TRUE; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
442 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
443 if(num_elem <= 0) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
444 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
445 return_flag = FALSE; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
446 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
447 else |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
448 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
449 primitive_id = l1a.dyn_dwnld.waiting_patch_fifo.signal_code_vect[0]; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
450 for (ind = 0;ind<num_elem-1;ind++) |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
451 l1a.dyn_dwnld.waiting_patch_fifo.signal_code_vect[ind] = l1a.dyn_dwnld.waiting_patch_fifo.signal_code_vect[ind+1]; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
452 l1a.dyn_dwnld.waiting_patch_fifo.signal_code_vect[num_elem-1] = 0; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
453 l1a.dyn_dwnld.waiting_patch_fifo.num_of_elem = num_elem-1; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
454 *p_primitive = primitive_id; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
455 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
456 return return_flag; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
457 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
458 /*---------------------------------------------------------- */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
459 /* l1_check_Fifo_Primitive */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
460 /*---------------------------------------------------------- */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
461 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
462 /* Parameters : none */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
463 /* Return : Number of elements in the FIFO */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
464 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
465 /* Description : Return number of elements in the FIFO */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
466 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
467 /* */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
468 /*---------------------------------------------------------- */ |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
469 |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
470 UWORD32 l1_check_Fifo_Primitive() |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
471 { |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
472 return l1a.dyn_dwnld.waiting_patch_fifo.num_of_elem; |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
473 } |
06d94fdaadf6
l1_dyn_dwl_*.c imported from LoCosto source
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
474 #endif // L1_DYN_DSP_DWNLD == 1 |