FreeCalypso > hg > freecalypso-sw
annotate gsm-fw/L1/dyn_dwl_cfile/l1_dyn_dwl_sync.c @ 925:c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Thu, 22 Oct 2015 18:19:42 +0000 |
parents | |
children | 48969469d961 |
rev | line source |
---|---|
925
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 /************* Revision Controle System Header ************* |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 * GSM Layer 1 software |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 * L1_DYN_DWL_SYNC.C |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 * |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 * Filename l1_dyn_dwl_sync.c |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 * Copyright 2004 (C) Texas Instruments |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 * |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 ************* Revision Controle System Header *************/ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 #include <stdio.h> |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 #include <string.h> |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 #include "nucleus.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 #include "l1_confg.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 #include "l1_types.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 #include "sys_types.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 #include "cust_os.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 #include "l1audio_signa.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 #include "l1audio_const.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 #include "l1audio_cust.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 #include "l1audio_defty.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 #include "l1_const.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 #include "l1tm_defty.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 #if (L1_GTT == 1) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
25 #include "l1gtt_const.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 #include "l1gtt_defty.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 #endif |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 #if (L1_DYN_DSP_DWNLD==1) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 #include "l1_dyn_dwl_defty.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
30 #include "l1_dyn_dwl_msgty.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 #include "l1_dyn_dwl_const.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 #include "l1_dyn_dwl_signa.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
33 #include "l1_dyn_dwl_error.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 #include "l1_dyn_dwl_proto.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
35 #include "l1_api_hisr.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
36 #endif |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
37 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
38 #if (L1_MP3 == 1) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
39 #include "l1mp3_defty.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
40 #endif //L1_MP3 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
41 #if (L1_MIDI == 1) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
42 #include "l1midi_defty.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
43 #endif |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
44 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
45 #include "l1_macro.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
46 #include "l1_defty.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
47 #include "l1_varex.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
48 #include "l1_trace.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
49 #include "sys_dma.h" |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
50 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
51 #if (L1_DYN_DSP_DWNLD == 1) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
52 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
53 extern T_DYN_DWNLD_MCU_DSP *dyn_dwl_ndb; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
54 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
55 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
56 /*-------------------------------------------------------*/ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
57 /* l1s_dyn_dsp_dwnld_manager() */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
58 /*-------------------------------------------------------*/ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
59 /* */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
60 /* Parameters : n/a */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
61 /* */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
62 /* Return : n/a */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
63 /* */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
64 /* Description : dsp dynamic download L1S manager task. */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
65 /* */ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
66 /*-------------------------------------------------------*/ |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
67 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
68 void l1s_dyn_dwnld_manager(void) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
69 { |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
70 enum states |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
71 { |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
72 WAIT_INIT = 0, |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
73 WAIT_RESULT, |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
74 WAIT_STOP |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
75 }; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
76 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
77 UWORD8 *state = &l1s.dyn_dwnld_state; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
78 xSignalHeaderRec *conf_msg; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
79 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
80 switch(*state) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
81 { |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
82 case WAIT_INIT: |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
83 { |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
84 if(l1a_l1s_com.dyn_dwnld_task.start==TRUE) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
85 { |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
86 // make sure the DSP is able to receive API interrupt |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
87 // for this, we wait 1 TDMA frame |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
88 // change state |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
89 *state=WAIT_RESULT; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
90 } |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
91 } |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
92 break; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
93 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
94 case WAIT_RESULT: |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
95 { |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
96 // reset the command |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
97 l1a_l1s_com.dyn_dwnld_task.start=FALSE; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
98 // send start background to the DSP |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
99 dyn_dwl_ndb->d_api_dwl_download_ctrl = (API) C_DWL_DOWNLOAD_CTRL_INIT; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
100 l1s_dsp_com.dsp_ndb_ptr->a_background_tasks[C_BGD_DSP_DYN_DWNLD] = (API)((C_BGD_DSP_DYN_DWNLD<<11) | 1); |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
101 l1s_dsp_com.dsp_ndb_ptr->d_background_enable|=(API)(1<<C_BGD_DSP_DYN_DWNLD); |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
102 l1_trigger_api_interrupt(); |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
103 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
104 // change state |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
105 *state=WAIT_STOP; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
106 } |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
107 break; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
108 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
109 case WAIT_STOP: |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
110 { |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
111 if(l1a_l1s_com.dyn_dwnld_task.stop==TRUE) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
112 { |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
113 // reset the command |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
114 l1a_l1s_com.dyn_dwnld_task.stop=FALSE; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
115 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
116 // send stop background to the DSP |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
117 l1s_dsp_com.dsp_ndb_ptr->a_background_tasks[C_BGD_DSP_DYN_DWNLD] = (API)((C_BGD_DSP_DYN_DWNLD<<11) | 0); |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
118 l1s_dsp_com.dsp_ndb_ptr->d_background_enable&=(API)(~(1<<C_BGD_DSP_DYN_DWNLD)); |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
119 l1_trigger_api_interrupt(); |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
120 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
121 // send confirmation to the L1A |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
122 conf_msg=os_alloc_sig(0); |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
123 DEBUGMSG(status,NU_ALLOC_ERR) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
124 conf_msg->SignalCode=L1_DYN_DWNLD_STOP_CON; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
125 os_send_sig(conf_msg,L1C1_QUEUE); |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
126 DEBUGMSG(status,NU_SEND_QUEUE_ERR) |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
127 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
128 // change state |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
129 *state=WAIT_INIT; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
130 } |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
131 } |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
132 break; |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
133 } |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
134 } |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
135 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
136 #endif // L1_DYN_DSP_DWNLD==1 |
c56ba3363aa3
gsm-fw: l1_dyn_dwl code imported from tcs211-l1-reconst
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
137 |