annotate src/cs/layer1/tm_cust0/l1tm_tpu12.c @ 686:59f07d67eb45

luna target split into luna1 and luna2 luna1 is FC Luna based on iWOW DSK v4.0 or v5.0 motherboard luna2 is FC Luna based on FC Caramel2 MB
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 12 Oct 2020 18:51:24 +0000
parents b870b6a44d31
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
234
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /************* Revision Controle System Header *************
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * GSM Layer 1 software
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * L1TM_TPU2.C
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 *
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 * Filename %M%
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 * Version %I%
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 * Date %G%
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 *
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 ************* Revision Controle System Header *************/
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 #include "l1_confg.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 #if (TESTMODE && (RF==12))
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 #include "tm_defs.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 #include "l1_const.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 #include "l1_types.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 #include "l1tm_defty.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 #include "l1tm_cust.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 #include "l1tm_tpu12.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 #if (AUDIO_TASK == 1)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 #include "l1audio_const.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 #include "l1audio_cust.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 #include "l1audio_defty.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 #endif
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 ////////////////////////////henry
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 #if (L1_GTT == 1)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 #include "l1gtt_const.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 #include "l1gtt_defty.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 #endif
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 ///////////////////////////
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 #include "l1_defty.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 #include "l1_msgty.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 #include "l1_tabs.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 #include "l1tm_msgty.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 #include "l1tm_varex.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2))
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 #include "spi_drv.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 #endif
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 #include "tpudrv12.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 #include "l1_rf12.h"
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 #include <string.h>
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 // Import band configuration from Flash module (need to replace by an access function)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 // External function prototypes
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 void Cust_tm_tpu_table_write (T_TM_RETURN *tm_return, WORD8 index, UWORD8 size, UWORD8 table[])
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 /*
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 INDICES BETWEEN in [0..63] RANGE ARE RESERVED FOR TI RF MODULE
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 */
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 // fill in the cid
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 tm_return->cid = TPU_TABLE_WRITE;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 switch (index)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 default:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 tm_return->size = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 tm_return->status = E_BADINDEX;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 } // end of switch
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 void Cust_tm_tpu_table_read (T_TM_RETURN *tm_return, WORD8 index)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 /*
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 INDICES BETWEEN in [0..63] RANGE ARE RESERVED FOR TI RF MODULE
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 */
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 // fill in the cid
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 tm_return->cid = TPU_TABLE_READ;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 switch (index)
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 {
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 default:
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 tm_return->size = 0;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 tm_return->status = E_BADINDEX;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 break;
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 } // end of switch
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 }
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91
b870b6a44d31 l1audio and l1tm reconstructed source imported from tcs211-l1-reconst
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 #endif //TESTMODE