annotate gsm-fw/L1/cust0/l1_cust.c @ 528:1affe428bf72

getting closer to compiling l1_cust.c
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Tue, 15 Jul 2014 16:54:52 +0000
parents b92febec14aa
children 9c91a1f670bd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
523
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
1 /*
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
2 * This FreeCalypso version of l1_cust.c is based on the LoCosto version;
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
3 * see ../cust1/l1_cust.c for the original.
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
4 */
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5
523
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
6 #include <string.h>
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
7 #include "config.h"
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
8 #include "sys_types.h"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
10 #include "../../riviera/rv/general.h"
523
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
11 #include "../../nucleus/nucleus.h"
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
12 #include "../../nucleus/tm_defs.h"
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
13 #include "../../gpf/inc/cust_os.h"
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
14
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
15 #include "l1_confg.h"
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
16 #include "l1_const.h"
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
17 #include "../../bsp/ulpd.h"
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
18 #include "l1_types.h"
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
19 #include "l1_time.h"
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
20 #include "l1_trace.h"
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
21 #include "l1_macro.h"
523
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
22 #include "../../serial/serialswitch.h"
b92febec14aa started FC version of l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 517
diff changeset
23 #include "../../bsp/abb+spi/abb.h"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
24
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
25 #if CONFIG_GSM
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
26 #include "../../bsp/sim.h"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
27 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
28
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
29 #if TESTMODE
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
30 #include "l1tm_defty.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
31 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
32
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
33 #if (AUDIO_TASK == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
34 #include "l1audio_const.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
35 #include "l1audio_cust.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
36 #include "l1audio_defty.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
37 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
38
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
39 #if (L1_GTT == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
40 #include "l1gtt_const.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
41 #include "l1gtt_defty.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
42 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
43
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
44 #if (L1_MP3 == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
45 #include "l1mp3_defty.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
46 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
47
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
48 #if (L1_MIDI == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
49 #include "l1midi_defty.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
50 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
51
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
52 #include "l1_defty.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
53 #include "l1_msgty.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
54 #include "l1_tabs.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
55 #include "l1_varex.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
56 #include "l1_proto.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
57 #if (VCXO_ALGO == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
58 #include "l1_ctl.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
59 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
60
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
61
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
62 #if (RF_FAM == 61)
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
63 #include "drp_drive.h"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
64 #include "tpudrv61.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
65 #include "l1_rf61.h"
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
66 //#include "l1_rf61.c"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
67 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
68
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
69
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
70 #if (RF_FAM == 60 )
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
71 #include "drp_drive.h"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
72 #include "tpudrv60.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
73 #include "l1_rf60.h"
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
74 //#include "l1_rf60.c"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
75 //#include "rf60.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
76 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
77
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
78 #if (RF_FAM == 43)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
79 #include "tpudrv43.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
80 #include "l1_rf43.h"
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
81 //#include "l1_rf43.c"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
82 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
83
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
84 #if (RF_FAM == 35)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
85 #include "tpudrv35.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
86 #include "l1_rf35.h"
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
87 //#include "l1_rf35.c"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
88 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
89
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
90 #if (RF_FAM == 12)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
91 #include "tpudrv12.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
92 #include "l1_rf12.h"
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
93 //#include "l1_rf12.c"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
94 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
95
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
96 #if (RF_FAM == 10)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
97 #include "tpudrv10.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
98 #include "l1_rf10.h"
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
99 //#include "l1_rf10.c"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
100 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
101
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
102 #if (RF_FAM == 8)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
103 #include "tpudrv8.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
104 #include "l1_rf8.h"
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
105 //#include "l1_rf8.c"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
106 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
107
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
108 #if (RF_FAM == 2)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
109 #include "l1_rf2.h"
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
110 //#include "l1_rf2.c"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
111 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
112
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
113 #if (DRP_FW_EXT == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
114 #include "l1_drp_inc.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
115 #include "l1_ver.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
116 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
117
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
118 /*
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
119 * FreeCalypso change: l1_rf12.c is now a separate compilation unit,
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
120 * so we need to extern the data objects defined therein.
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
121 */
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
122 extern T_RF rf;
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
123 extern T_RF_BAND rf_band[GSM_BANDS];
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
124 extern const T_RF_BAND rf_850, rf_900, rf_1800, rf_1900;
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
125 extern UWORD16 abb[ABB_TABLE_SIZE];
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
126 extern UWORD16 AGC_TABLE[AGC_TABLE_SIZE];
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
127 extern T_ADC adc;
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
128 extern T_ADCCAL adc_cal;
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
129 extern T_TEMP temperature[TEMP_TABLE_SIZE];
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
130
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
131 // Nucleus functions
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
132 extern INT TMD_Timer_State;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
133 extern UWORD32 TMD_Timer; // for big sleep
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
134 extern UWORD32 TCD_Priority_Groups;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
135 extern VOID *TCD_Current_Thread;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
136 extern TC_HCB *TCD_Active_HISR_Heads[TC_HISR_PRIORITIES];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
137 extern TC_HCB *TCD_Active_HISR_Tails[TC_HISR_PRIORITIES];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
138 extern TC_PROTECT TCD_System_Protect;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
139
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
140 #define FFS_WORKAROUND 0
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
141
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
142 #if 1 // (FFS_WORKAROUND == 1)
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
143 #include "../../services/ffs/ffs.h"
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
144 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
145 /* typedef signed int int32;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
146 typedef signed char effs_t;*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
147 typedef signed int filesize_t;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
148 effs_t ffs_fwrite(const char *name, void *addr, filesize_t size);
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
149 #if (DRP_FW_EXT == 0)
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
150 effs_t ffs_fread(const char *name, void *addr, filesize_t size);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
151 #endif
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
152 #endif
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
153
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
154 // Import band configuration from Flash module (need to replace by an access function)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
155 //extern UWORD8 std;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
156 extern T_L1_CONFIG l1_config;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
157 extern T_L1S_GLOBAL l1s;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
158
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
159 #if 0 //(OP_L1_STANDALONE == 0)
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
160 extern SYS_BOOL cama_sleep_status(void);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
161 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
162
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
163 #if (CODE_VERSION != SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
164 // Import serial switch configuration
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
165 #if (CHIPSET == 12)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
166 extern char ser_cfg_info[3];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
167 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
168 extern char ser_cfg_info[2];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
169 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
170 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
171
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
172 #if(REL99 && FF_PRF)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
173 T_TX_LEVEL *Cust_get_uplink_apc_power_reduction(UWORD8 band,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
174 UWORD8 number_uplink_timeslot,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
175 T_TX_LEVEL *p_tx_level);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
176 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
177
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
178
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
179 void get_cal_from_nvmem (UWORD8 *ptr, UWORD16 len, UWORD8 id);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
180 UWORD8 save_cal_in_nvmem (UWORD8 *ptr, UWORD16 len, UWORD8 id);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
181 void config_rf_rw_band(char type, UWORD8 read);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
182 void config_rf_read(char type);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
183 void config_rf_write(char type);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
184
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
185 #if (RF_FAM == 61)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
186 #include "drp_api.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
187
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
188 extern T_DRP_SW_DATA drp_sw_data_init;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
189 extern T_DRP_SW_DATA drp_sw_data_calib;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
190 extern T_DRP_SW_DATA drp_sw_data_calib_saved;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
191 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
192
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
193 enum {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
194 RF_ID = 0,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
195 ADC_ID = 1
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
196 };
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
197
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
198 #if (L1_FF_MULTIBAND == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
199 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
200 /* Parameters: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
201 /* Return: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
202 /* Functionality: Defines the location of rf-struct */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
203 /* for each std. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
204 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
205 //omaps00090550 #83 warinng removal
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
206 static const T_BAND_CONFIG band_config[] =
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
207 { /*ffs name, default addr, max carrier, min tx pwr */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
208 {"",(T_RF_BAND *) 0,0,0},//undefined
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
209 {"900", (T_RF_BAND *)&rf_900, 174, 19 },//EGSM
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
210 {"1800",(T_RF_BAND *)&rf_1800, 374, 15 },//DCS
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
211 {"1900",(T_RF_BAND *)&rf_1900, 299, 15 },//PCS
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
212 {"850", (T_RF_BAND *)&rf_850, 124, 19 },//GSM850
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
213 #if (RF_FAM == 10)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
214 {"1900_us",(T_RF_BAND *)&rf_1900, 299, 15 },//usdual 1900 rf tables are the same as 3band 1900 rf tables at the moment
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
215 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
216 {"900", (T_RF_BAND *)&rf_900, 124, 19 } //GSM, this should be last entry
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
217 };
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
218
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
219 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
220 /* Parameters: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
221 /* Return: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
222 /* Functionality: Defines the indices into band_config */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
223 /* for each std. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
224 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
225 const T_STD_CONFIG std_config[] =
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
226 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
227 /* band1 index, band2 index, txpwr turning point, first arfcn*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
228 { 0, 0, 0, 0 }, // std = 0 not used
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
229 { BAND_GSM900, BAND_NONE, 0, 1 }, // std = 1 GSM
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
230 { BAND_EGSM900, BAND_NONE, 0, 1 }, // std = 2 EGSM
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
231 { BAND_PCS1900, BAND_NONE, 21, 512 }, // std = 3 PCS
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
232 { BAND_DCS1800, BAND_NONE, 28, 512 }, // std = 4 DCS
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
233 { BAND_GSM900, BAND_DCS1800, 28, 1 }, // std = 5 DUAL
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
234 { BAND_EGSM900, BAND_DCS1800, 28, 1 }, // std = 6 DUALEXT
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
235 { BAND_GSM850, BAND_NONE, 0, 128 }, // std = 7 850
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
236 #if (RF_FAM == 10)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
237 { BAND_GSM850, BAND_PCS1900_US, 21, 1 } // std = 8 850/1900
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
238 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
239 { BAND_GSM850, BAND_PCS1900, 21, 1 } // std = 8 850/1900
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
240 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
241 };
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
242 #endif //if (L1_FF_MULTIBAND == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
243
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
244 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
245 /* Prototypes of external functions used in this file. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
246 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
247 void l1_initialize(T_MMI_L1_CONFIG *mmi_l1_config);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
248 #if (L1_FF_MULTIBAND == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
249 WORD16 Convert_l1_radio_freq (UWORD16 radio_freq);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
250 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
251 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
252 /* Cust_recover_Os() */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
253 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
254 /* */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
255 /* Description: adjust OS from sleep duration */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
256 /* ------------ */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
257 /* This function fix the : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
258 /* - system clock */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
259 /* - Nucleus timers */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
260 /* - xxxxxx (customer dependant) */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
261 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
262
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
263 UWORD8 Cust_recover_Os(void)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
264 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
265 #if (CODE_VERSION != SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
266 if (l1_config.pwr_mngt == PWR_MNGT)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
267 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
268 UWORD32 current_system_clock;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
269
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
270 /***************************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
271 // Fix System clock and Nucleus Timers if any.... */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
272 /***************************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
273 // Fix System clock ....
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
274 current_system_clock = NU_Retrieve_Clock();
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
275 current_system_clock += l1s.pw_mgr.sleep_duration;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
276 NU_Set_Clock(current_system_clock);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
277
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
278 // Fix Nucleus timer (if needed) ....
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
279 if (TMD_Timer_State == TM_ACTIVE)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
280 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
281 TMD_Timer -= l1s.pw_mgr.sleep_duration;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
282 if (!TMD_Timer) TMD_Timer_State = TM_EXPIRED;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
283 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
284
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
285 /***************************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
286 // Cust dependant part ... */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
287 /***************************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
288 //.............
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
289 //.............
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
290 //..............
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
291 return(TRUE);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
292
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
293 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
294 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
295 return(TRUE); //omaps00090550
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
296 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
297
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
298
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
299
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
300 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
301 /* Cust_check_system() */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
302 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
303 /* */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
304 /* Description: */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
305 /* ------------ */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
306 /* GSM 1.5 : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
307 /* - authorize UWIRE clock to be stopped */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
308 /* and write value in l1s.pw_mgr.modules_status. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
309 /* - authorize ARMIO clock to be stopped if the light is */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
310 /* off and write value in l1s.pw_mgr.modules_status. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
311 /* - check if SIM clock have been stopped */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
312 /* before allowing DEEP SLEEP. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
313 /* - check if UARTs are ready to enter deep sleep */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
314 /* - choose the sleep mode */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
315 /* */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
316 /* Return: */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
317 /* ------- */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
318 /* DO_NOT_SLEEP, FRAME_STOP or CLOCK_STOP */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
319 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
320 UWORD8 Cust_check_system(void)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
321 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
322
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
323 #if (CODE_VERSION != SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
324 if (l1_config.pwr_mngt == PWR_MNGT)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
325 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
326
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
327 #if (L2_L3_SIMUL == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
328 // Forbid deep sleep if the light is on
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
329 /* FreeCalypso change: this LT_Status() function is defunct */
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
330 #if 0
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
331 if(LT_Status())
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
332 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
333 //cut ARMIO and UWIRE clocks in big sleep
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
334 l1s.pw_mgr.modules_status = ARMIO_CLK_CUT | UWIRE_CLK_CUT ;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
335 l1s.pw_mgr.why_big_sleep = BIG_SLEEP_DUE_TO_LIGHT_ON;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
336 return(FRAME_STOP); // BIG sleep
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
337 }
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
338 #endif
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
339
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
340 #if (OP_L1_STANDALONE == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
341 // Forbid deep sleep if the camera is working
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
342 /* FreeCalypso change: no camera */
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
343 #if 0
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
344 if(!cama_sleep_status())
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
345 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
346 l1s.pw_mgr.why_big_sleep = BIG_SLEEP_DUE_TO_CAMERA;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
347 return(FRAME_STOP); // BIG sleep
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
348 }
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
349 #endif
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
350
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
351 // Forbid deep sleep if the SIM and UARTs not ready
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
352 // FC note: this call to SIM_SleepStatus() *is* present in the Leonardo object
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
353 #if CONFIG_GSM //(REQUIRED_FOR_ESAMPLE_LOCOSTO)
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
354 // Forbid deep sleep if the SIM and UARTs not ready
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
355 if(SIM_SleepStatus())
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
356 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
357 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
358 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
359 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
360 if(SER_UartSleepStatus())
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
361 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
362 return(CLOCK_STOP); // DEEP sleep
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
363 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
364 else l1s.pw_mgr.why_big_sleep = BIG_SLEEP_DUE_TO_UART;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
365 #if (L2_L3_SIMUL == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
366 #if (OP_L1_STANDALONE == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
367 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
368 // Forbid deep sleep if the SIM and UARTs not ready
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
369 #if CONFIG_GSM //(REQUIRED_FOR_ESAMPLE_LOCOSTO)
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
370 else l1s.pw_mgr.why_big_sleep = BIG_SLEEP_DUE_TO_SIM;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
371 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
372 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
373 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
374 // cut ARMIO and UWIRE clocks in big sleep
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
375 l1s.pw_mgr.modules_status = ARMIO_CLK_CUT | UWIRE_CLK_CUT ;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
376 return(FRAME_STOP); // BIG sleep
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
377 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
378 #else // Simulation part
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
379 return(CLOCK_STOP); // DEEP sleep
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
380 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
381 return(CLOCK_STOP); // omaps00090550
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
382 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
383
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
384
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
385 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
386 /* Parameters: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
387 /* Return: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
388 /* Functionality: Read the RF configuration, tables etc. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
389 /* from FFS files. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
390 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
391 //omaps00090550 #83-d warnimg removal
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
392 static const T_CONFIG_FILE config_files_common[] =
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
393 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
394 #if (CODE_VERSION != SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
395
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
396 // The first char is NOT part of the filename. It is used for
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
397 // categorizing the ffs file contents:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
398 // f=rf-cal, F=rf-config,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
399 // t=tx-cal, T=tx-config,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
400 // r=rx-cal, R=rx-config,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
401 // s=sys-cal, S=sys-config,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
402 "f/gsm/rf/afcdac", &rf.afc.eeprom_afc, sizeof(rf.afc.eeprom_afc),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
403 "F/gsm/rf/stdmap", &rf.radio_band_support, sizeof(rf.radio_band_support),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
404 #if (VCXO_ALGO == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
405 "F/gsm/rf/afcparams", &rf.afc.psi_sta_inv, 4 * sizeof(UWORD32) + 4 * sizeof(WORD16),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
406 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
407 "F/gsm/rf/afcparams", &rf.afc.psi_sta_inv, 4 * sizeof(UWORD32),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
408 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
409
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
410 "R/gsm/rf/rx/agcglobals", &rf.rx.agc, 4 * sizeof(UWORD16),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
411 "R/gsm/rf/rx/il2agc", &rf.rx.agc.il2agc_pwr[0], 3 * sizeof(rf.rx.agc.il2agc_pwr),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
412 "R/gsm/rf/rx/agcwords", &AGC_TABLE, sizeof(AGC_TABLE),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
413
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
414 "s/sys/adccal", &adc_cal, sizeof(adc_cal),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
415
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
416 "S/sys/abb", &abb, sizeof(abb),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
417 "S/sys/uartswitch", &ser_cfg_info, sizeof(ser_cfg_info),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
418
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
419 #if (RF_FAM ==61)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
420 "S/sys/drp_wrapper", & drp_wrapper, sizeof(drp_wrapper),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
421 #if (DRP_FW_EXT == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
422 "S/sys/drp_calibration", & drp_sw_data_calib, sizeof(drp_sw_data_calib),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
423 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
424 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
425
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
426 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
427 NULL, 0, 0 // terminator
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
428 };
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
429
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
430 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
431 /* Parameters: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
432 /* Return: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
433 /* Functionality: Read the RF configurations for */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
434 /* each band from FFS files. These files */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
435 /* are defined for one band, and and used */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
436 /* for all bands. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
437 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
438 //omaps00090550 #83 warning removal
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
439 static const T_CONFIG_FILE config_files_band[] =
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
440 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
441 // The first char is NOT part of the filename. It is used for
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
442 // categorizing the ffs file contents:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
443 // f=rf-cal, F=rf-config,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
444 // t=tx-cal, T=tx-config,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
445 // r=rx-cal, R=rx-config,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
446 // s=sys-cal, S=sys-config,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
447
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
448 // generic for all bands
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
449 // band[0] is used as template for all bands.
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
450 "t/gsm/rf/tx/ramps", &rf_band[0].tx.ramp_tables, sizeof(rf_band[0].tx.ramp_tables),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
451 "t/gsm/rf/tx/levels", &rf_band[0].tx.levels, sizeof(rf_band[0].tx.levels),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
452 "t/gsm/rf/tx/calchan", &rf_band[0].tx.chan_cal_table, sizeof(rf_band[0].tx.chan_cal_table),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
453 "T/gsm/rf/tx/caltemp", &rf_band[0].tx.temp, sizeof(rf_band[0].tx.temp),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
454
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
455 "r/gsm/rf/rx/calchan", &rf_band[0].rx.agc_bands, sizeof(rf_band[0].rx.agc_bands),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
456 "R/gsm/rf/rx/caltemp", &rf_band[0].rx.temp, sizeof(rf_band[0].rx.temp),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
457 "r/gsm/rf/rx/agcparams", &rf_band[0].rx.rx_cal_params, sizeof(rf_band[0].rx.rx_cal_params),
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
458 NULL, 0, 0 // terminator
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
459 };
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
460
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
461 void config_ffs_read(char type)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
462 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
463 config_rf_read(type);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
464 config_rf_rw_band(type, 1);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
465 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
466
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
467 void config_ffs_write(char type)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
468 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
469 config_rf_write(type);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
470 config_rf_rw_band(type, 0);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
471 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
472
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
473 void config_rf_read(char type)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
474 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
475 const T_CONFIG_FILE *file = config_files_common;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
476
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
477 while (file->name != NULL)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
478 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
479 if (type == '*' || type == file->name[0]) {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
480 ffs_fread(&file->name[1], file->addr, file->size);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
481 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
482 file++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
483 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
484 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
485
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
486 void config_rf_write(char type)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
487 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
488 const T_CONFIG_FILE *file = config_files_common;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
489
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
490 while (file->name != NULL)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
491 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
492 if (type == '*' || type == file->name[0]) {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
493 ffs_fwrite(&file->name[1], file->addr, file->size);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
494 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
495 file++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
496 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
497 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
498
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
499 void config_rf_rw_band(char type, UWORD8 read)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
500 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
501 const T_CONFIG_FILE *f1 = config_files_band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
502 UWORD8 i;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
503 WORD32 offset;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
504 char name[64];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
505 char *p;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
506 #if (L1_FF_MULTIBAND == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
507 UWORD8 std = l1_config.std.id;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
508 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
509
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
510 #if FFS_WORKAROUND == 1
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
511 struct stat_s stat;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
512 UWORD16 time;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
513 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
514 #if (L1_FF_MULTIBAND == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
515 for (i=0; i< GSM_BANDS; i++)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
516 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
517 if(std_config[std].band[i] !=0 )
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
518 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
519 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
520 for (i = 0; i < RF_NB_SUPPORTED_BANDS; i++)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
521 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
522 #endif /*if (L1_FF_MULTIBAND == 0) */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
523 f1 = &config_files_band[0];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
524 while (f1->name != NULL)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
525 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
526 offset = (WORD32) f1->addr - (WORD32) &rf_band[0]; //offset in bytes
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
527 p = ((char *) &rf_band[i]) + offset;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
528 if (type == '*' || type == f1->name[0])
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
529 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
530 strcpy(name, &f1->name[1]);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
531 strcat(name, ".");
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
532 #if (L1_FF_MULTIBAND == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
533 strcat(name, band_config[std_config[std].band[i]].name);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
534 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
535 strcat(name, multiband_rf[i].name);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
536 #endif /*if (L1_FF_MULTIBAND == 0)*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
537
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
538 if (read == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
539 ffs_fread(name, p, f1->size);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
540 else //write == 0
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
541 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
542 ffs_fwrite(name, p, f1->size);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
543
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
544 // wait until ffs write has finished
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
545 #if FFS_WORKAROUND == 1
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
546 stat.inode = 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
547 time = 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
548
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
549 do {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
550 rvf_delay(10); // in milliseconds
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
551 time += 10;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
552 ffs_stat(name, &stat);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
553 } while (stat.inode == 0 && time < 500);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
554 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
555 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
556 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
557 f1++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
558 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
559 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
560 #if (L1_FF_MULTIBAND == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
561 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
562 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
563 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
564
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
565
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
566 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
567 /* Cust_init_std() */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
568 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
569 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
570 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
571 /* Functionality : Init Standard variable configuration */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
572 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
573 void Cust_init_std(void)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
574 #if (L1_FF_MULTIBAND == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
575 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
576 UWORD8 std = l1_config.std.id;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
577 UWORD8 band1, band2;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
578 T_RF_BAND *pt1, *pt2;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
579
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
580 band1 = std_config[std].band[0];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
581 band2 = std_config[std].band[1];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
582
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
583 //get these from std
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
584 pt1 = band_config[band1].addr;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
585 pt2 = band_config[band2].addr;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
586
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
587 // copy rf-struct from default flash to ram
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
588 memcpy(&rf_band[0], pt1, sizeof(T_RF_BAND));
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
589
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
590 if(std_config[std].band[1] != BAND_NONE )
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
591 memcpy(&rf_band[1], pt2, sizeof(T_RF_BAND));
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
592
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
593 // Read all RF and system configuration from FFS *before* we copy any of
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
594 // the rf structure variables to other places, like L1.
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
595
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
596 config_ffs_read('*');
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
597
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
598 l1_config.std.first_radio_freq = std_config[std].first_arfcn;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
599
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
600 if(band2!=0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
601 l1_config.std.first_radio_freq_band2 = band_config[band1].max_carrier + 1;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
602 else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
603 l1_config.std.first_radio_freq_band2 = 0; //band1 carrier + 1 else 0
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
604
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
605 // if band2 is not used it is initialised with zeros
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
606 l1_config.std.nbmax_carrier = band_config[band1].max_carrier;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
607 if(band2!=0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
608 l1_config.std.nbmax_carrier += band_config[band2].max_carrier;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
609
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
610 l1_config.std.max_txpwr_band1 = band_config[band1].max_txpwr;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
611 l1_config.std.max_txpwr_band2 = band_config[band2].max_txpwr;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
612 l1_config.std.txpwr_turning_point = std_config[std].txpwr_tp;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
613 l1_config.std.cal_freq1_band1 = 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
614 l1_config.std.cal_freq1_band2 = 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
615
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
616 l1_config.std.g_magic_band1 = rf_band[MULTI_BAND1].rx.rx_cal_params.g_magic;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
617 l1_config.std.lna_att_band1 = rf_band[MULTI_BAND1].rx.rx_cal_params.lna_att;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
618 l1_config.std.lna_switch_thr_low_band1 = rf_band[MULTI_BAND1].rx.rx_cal_params.lna_switch_thr_low;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
619 l1_config.std.lna_switch_thr_high_band1 = rf_band[MULTI_BAND1].rx.rx_cal_params.lna_switch_thr_high;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
620 l1_config.std.swap_iq_band1 = rf_band[MULTI_BAND1].swap_iq;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
621
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
622 l1_config.std.g_magic_band2 = rf_band[MULTI_BAND2].rx.rx_cal_params.g_magic;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
623 l1_config.std.lna_att_band2 = rf_band[MULTI_BAND2].rx.rx_cal_params.lna_att;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
624 l1_config.std.lna_switch_thr_low_band2 = rf_band[MULTI_BAND2].rx.rx_cal_params.lna_switch_thr_low;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
625 l1_config.std.lna_switch_thr_high_band2 = rf_band[MULTI_BAND2].rx.rx_cal_params.lna_switch_thr_high;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
626 l1_config.std.swap_iq_band2 = rf_band[MULTI_BAND2].swap_iq;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
627
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
628 l1_config.std.radio_freq_index_offset = l1_config.std.first_radio_freq-1;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
629
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
630 // init variable indicating which radio bands are supported by the chosen RF
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
631 l1_config.std.radio_band_support = rf.radio_band_support;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
632
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
633 //TBD: DRP Calib: Currently the Calib Data are only used for the routines, TBD add to l1_config. from saved Calibration
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
634 // on a need basis ?
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
635 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
636 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
637 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
638 UWORD8 i;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
639
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
640 for (i = 0; i < RF_NB_SUPPORTED_BANDS; i++)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
641 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
642 switch(multiband_rf[i].gsm_band_identifier)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
643 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
644 case RF_GSM900:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
645 rf_band[i]=rf_900;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
646 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
647 case RF_GSM850:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
648 rf_band[i]=rf_850;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
649 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
650 case RF_DCS1800:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
651 rf_band[i]=rf_1800;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
652 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
653 case RF_PCS1900:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
654 rf_band[i]=rf_1900;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
655 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
656 default:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
657 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
658 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
659 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
660 config_ffs_read('*');
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
661 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
662 #endif // if (L1_FF_MULTIBAND == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
663
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
664
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
665 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
666 /* Cust_init_params() */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
667 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
668 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
669 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
670 /* Functionality : Init RF dependent paramters (AGC, TX) */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
671 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
672 void Cust_init_params(void)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
673 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
674
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
675 #if (CODE_VERSION==SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
676 extern UWORD16 simu_RX_SYNTH_SETUP_TIME; // set in xxx.txt l3 scenario file
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
677 extern UWORD16 simu_TX_SYNTH_SETUP_TIME; // set in xxx.txt l3 scenario file
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
678
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
679 l1_config.params.rx_synth_setup_time = simu_RX_SYNTH_SETUP_TIME;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
680 l1_config.params.tx_synth_setup_time = simu_TX_SYNTH_SETUP_TIME;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
681 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
682 l1_config.params.rx_synth_setup_time = RX_SYNTH_SETUP_TIME;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
683 l1_config.params.tx_synth_setup_time = TX_SYNTH_SETUP_TIME;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
684 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
685
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
686
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
687 // Convert SYNTH_SETUP_TIME into SPLIT.
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
688 // We have kept a margin of 20qbit (EPSILON_MEAS) to cover offset change and Scenario closing time + margin.
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
689 l1_config.params.rx_synth_load_split = 1L + (l1_config.params.rx_synth_setup_time + EPSILON_MEAS) / (BP_DURATION/BP_SPLIT);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
690 l1_config.params.tx_synth_load_split = 1L + (l1_config.params.tx_synth_setup_time + EPSILON_MEAS) / (BP_DURATION/BP_SPLIT);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
691
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
692 l1_config.params.rx_synth_start_time = TPU_CLOCK_RANGE + PROVISION_TIME - l1_config.params.rx_synth_setup_time;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
693 l1_config.params.tx_synth_start_time = TPU_CLOCK_RANGE - l1_config.params.tx_synth_setup_time;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
694
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
695 l1_config.params.rx_change_synchro_time = l1_config.params.rx_synth_start_time - EPSILON_SYNC;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
696 l1_config.params.rx_change_offset_time = l1_config.params.rx_synth_start_time - EPSILON_OFFS;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
697
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
698 l1_config.params.tx_change_offset_time = TIME_OFFSET_TX -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
699 TA_MAX -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
700 l1_config.params.tx_synth_setup_time -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
701 EPSILON_OFFS;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
702
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
703 // TX duration = ramp up time + burst duration (data + tail bits)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
704 l1_config.params.tx_nb_duration = UL_ABB_DELAY + rf.tx.guard_bits*4 + NB_BURST_DURATION_UL;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
705 l1_config.params.tx_ra_duration = UL_ABB_DELAY + rf.tx.guard_bits*4 + RA_BURST_DURATION;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
706
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
707 l1_config.params.tx_nb_load_split = 1L + (l1_config.params.tx_nb_duration - rf.tx.prg_tx - NB_MARGIN) / (BP_DURATION/BP_SPLIT);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
708 l1_config.params.tx_ra_load_split = 1L + (l1_config.params.tx_ra_duration - rf.tx.prg_tx - NB_MARGIN) / (BP_DURATION/BP_SPLIT);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
709
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
710 // time for the end of RX and TX TPU scenarios
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
711 l1_config.params.rx_tpu_scenario_ending = RX_TPU_SCENARIO_ENDING;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
712 l1_config.params.tx_tpu_scenario_ending = TX_TPU_SCENARIO_ENDING;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
713
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
714 // FB26 anchoring time is computed backward to leave only 6 qbit margin between
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
715 // FB26 window and next activity (RX time tracking).
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
716 // This margin is used as follow:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
717 // Serving offset restore: 1 qbit (SERV_OFFS_REST_LOAD)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
718 // Tpu Sleep: 2 qbit (TPU_SLEEP_LOAD)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
719 // ---------
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
720 // Total: 3 qbit
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
721
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
722 l1_config.params.fb26_anchoring_time = (l1_config.params.rx_synth_start_time -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
723 #if (CODE_VERSION == SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
724 // simulator: end of scenario not included in window (no serialization)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
725 1 -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
726 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
727 // RF dependent end of RX TPU scenario
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
728 l1_config.params.rx_tpu_scenario_ending -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
729 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
730 EPSILON_SYNC -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
731 TPU_SLEEP_LOAD -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
732 SERV_OFFS_REST_LOAD -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
733 FB26_ACQUIS_DURATION -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
734 PROVISION_TIME +
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
735 TPU_CLOCK_RANGE) % TPU_CLOCK_RANGE;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
736
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
737 l1_config.params.fb26_change_offset_time = l1_config.params.fb26_anchoring_time +
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
738 PROVISION_TIME -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
739 l1_config.params.rx_synth_setup_time -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
740 EPSILON_OFFS;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
741
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
742 l1_config.params.guard_bits = rf.tx.guard_bits;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
743
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
744 l1_config.params.prg_tx_gsm = rf.tx.prg_tx;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
745 l1_config.params.prg_tx_dcs = rf.tx.prg_tx; //delay for dual band not implemented yet
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
746
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
747 l1_config.params.low_agc_noise_thr = rf.rx.agc.low_agc_noise_thr;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
748 l1_config.params.high_agc_sat_thr = rf.rx.agc.high_agc_sat_thr;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
749 l1_config.params.low_agc = rf.rx.agc.low_agc;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
750 l1_config.params.high_agc = rf.rx.agc.high_agc;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
751 l1_config.params.il_min = IL_MIN;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
752
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
753 l1_config.params.fixed_txpwr = FIXED_TXPWR;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
754 l1_config.params.eeprom_afc = rf.afc.eeprom_afc;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
755 l1_config.params.setup_afc_and_rf = SETUP_AFC_AND_RF;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
756 l1_config.params.rf_wakeup_tpu_scenario_duration = l1_config.params.setup_afc_and_rf + 1; //directly dependent of l1dmacro_RF_wakeup implementation
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
757
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
758 l1_config.params.psi_sta_inv = rf.afc.psi_sta_inv;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
759 l1_config.params.psi_st = rf.afc.psi_st;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
760 l1_config.params.psi_st_32 = rf.afc.psi_st_32;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
761 l1_config.params.psi_st_inv = rf.afc.psi_st_inv;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
762
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
763 #if (CODE_VERSION == SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
764 #if (VCXO_ALGO == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
765 l1_config.params.afc_algo = ALGO_AFC_LQG_PREDICTOR; // VCXO|VCTCXO - Choosing AFC algorithm
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
766 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
767 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
768 #if (VCXO_ALGO == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
769 l1_config.params.afc_dac_center = rf.afc.dac_center; // VCXO - assuming DAC linearity
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
770 l1_config.params.afc_dac_min = rf.afc.dac_min; // VCXO - assuming DAC linearity
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
771 l1_config.params.afc_dac_max = rf.afc.dac_max; // VCXO - assuming DAC linearity
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
772 #if (NEW_SNR_THRESHOLD == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
773 l1_config.params.afc_snr_thr = rf.afc.snr_thr; // VCXO - SNR threshold
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
774 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
775 l1_config.params.afc_snr_thr = L1_TOA_SNR_THRESHOLD;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
776 #endif /* NEW_SNR_THRESHOLD */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
777 l1_config.params.afc_algo = ALGO_AFC_LQG_PREDICTOR; // VCXO|VCTCXO - Choosing AFC algorithm
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
778 l1_config.params.afc_win_avg_size_M = C_WIN_AVG_SIZE_M; // VCXO - Average psi values with this value
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
779 l1_config.params.rgap_algo = ALGO_AFC_RXGAP; // VCXO - Choosing Reception Gap algorithm
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
780 l1_config.params.rgap_bad_snr_count_B = C_RGAP_BAD_SNR_COUNT_B; // VCXO - Prediction SNR count
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
781 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
782 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
783
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
784 #if DCO_ALGO
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
785 #if (RF_FAM == 10)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
786 // Enable DCO algorithm for direct conversion RFs
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
787 l1_config.params.dco_enabled = TRUE;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
788 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
789 l1_config.params.dco_enabled = FALSE;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
790 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
791 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
792
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
793 #if (ANALOG == 1)
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
794 l1_config.params.debug1 = C_DEBUG1; // Enable f_tx delay of 400000 cyc DEBUG
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
795 l1_config.params.afcctladd = abb[ABB_AFCCTLADD]; // Value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
796 l1_config.params.vbuctrl = abb[ABB_VBUCTRL]; // Uplink gain amp 0dB, Sidetone gain to mute
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
797 l1_config.params.vbdctrl = abb[ABB_VBDCTRL]; // Downlink gain amp 0dB, Volume control 0 dB
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
798 l1_config.params.bbctrl = abb[ABB_BBCTRL]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
799 l1_config.params.apcoff = abb[ABB_APCOFF]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
800 l1_config.params.bulioff = abb[ABB_BULIOFF]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
801 l1_config.params.bulqoff = abb[ABB_BULQOFF]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
802 l1_config.params.dai_onoff = abb[ABB_DAI_ON_OFF]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
803 l1_config.params.auxdac = abb[ABB_AUXDAC]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
804 l1_config.params.vbctrl = abb[ABB_VBCTRL]; // VULSWITCH=0, VDLAUX=1, VDLEAR=1
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
805 l1_config.params.apcdel1 = abb[ABB_APCDEL1]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
806 #endif
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
807 #if (ANALOG == 2)
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
808 l1_config.params.debug1 = C_DEBUG1; // Enable f_tx delay of 400000 cyc DEBUG
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
809 l1_config.params.afcctladd = abb[ABB_AFCCTLADD]; // Value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
810 l1_config.params.vbuctrl = abb[ABB_VBUCTRL]; // Uplink gain amp 0dB, Sidetone gain to mute
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
811 l1_config.params.vbdctrl = abb[ABB_VBDCTRL]; // Downlink gain amp 0dB, Volume control 0 dB
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
812 l1_config.params.bbctrl = abb[ABB_BBCTRL]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
813 l1_config.params.bulgcal = abb[ABB_BULGCAL]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
814 l1_config.params.apcoff = abb[ABB_APCOFF]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
815 l1_config.params.bulioff = abb[ABB_BULIOFF]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
816 l1_config.params.bulqoff = abb[ABB_BULQOFF]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
817 l1_config.params.dai_onoff = abb[ABB_DAI_ON_OFF]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
818 l1_config.params.auxdac = abb[ABB_AUXDAC]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
819 l1_config.params.vbctrl1 = abb[ABB_VBCTRL1]; // VULSWITCH=0, VDLAUX=1, VDLEAR=1
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
820 l1_config.params.vbctrl2 = abb[ABB_VBCTRL2]; // MICBIASEL=0, VDLHSO=0, MICAUX=0
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
821 l1_config.params.apcdel1 = abb[ABB_APCDEL1]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
822 l1_config.params.apcdel2 = abb[ABB_APCDEL2]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
823 #endif
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
824 #if (ANALOG == 3)
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
825 l1_config.params.debug1 = C_DEBUG1; // Enable f_tx delay of 400000 cyc DEBUG
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
826 l1_config.params.afcctladd = abb[ABB_AFCCTLADD]; // Value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
827 l1_config.params.vbuctrl = abb[ABB_VBUCTRL]; // Uplink gain amp 0dB, Sidetone gain to mute
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
828 l1_config.params.vbdctrl = abb[ABB_VBDCTRL]; // Downlink gain amp 0dB, Volume control 0 dB
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
829 l1_config.params.bbctrl = abb[ABB_BBCTRL]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
830 l1_config.params.bulgcal = abb[ABB_BULGCAL]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
831 l1_config.params.apcoff = abb[ABB_APCOFF]; // X2 Slope 128 and APCSWP disabled
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
832 l1_config.params.bulioff = abb[ABB_BULIOFF]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
833 l1_config.params.bulqoff = abb[ABB_BULQOFF]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
834 l1_config.params.dai_onoff = abb[ABB_DAI_ON_OFF]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
835 l1_config.params.auxdac = abb[ABB_AUXDAC]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
836 l1_config.params.vbctrl1 = abb[ABB_VBCTRL1]; // VULSWITCH=0
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
837 l1_config.params.vbctrl2 = abb[ABB_VBCTRL2]; // MICBIASEL=0, VDLHSO=0, MICAUX=0
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
838 l1_config.params.apcdel1 = abb[ABB_APCDEL1]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
839 l1_config.params.apcdel2 = abb[ABB_APCDEL2]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
840 l1_config.params.vbpop = abb[ABB_VBPOP]; // HSOAUTO enabled
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
841 l1_config.params.vau_delay_init = abb[ABB_VAUDINITD]; // 2 TDMA Frames between VDL "ON" and VDLHSO "ON"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
842 l1_config.params.vaud_cfg = abb[ABB_VAUDCTRL]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
843 l1_config.params.vauo_onoff = abb[ABB_VAUOCTRL]; // speech on AUX and EAR
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
844 l1_config.params.vaus_vol = abb[ABB_VAUSCTRL]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
845 l1_config.params.vaud_pll = abb[ABB_VAUDPLL]; // value at reset
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
846 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
847
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
848 #if (RF_FAM == 61)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
849 l1_config.params.apcctrl2 = drp_wrapper[DRP_WRAPPER_APCCTRL2];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
850 l1_config.params.apcdel1 = drp_wrapper[DRP_WRAPPER_APCDEL1];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
851 l1_config.params.apcdel2 = drp_wrapper[DRP_WRAPPER_APCDEL2];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
852 #endif
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
853 #if (ANALOG == 11)
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
854 l1_config.params.vulgain = abb[ABB_VULGAIN];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
855 l1_config.params.vdlgain = abb[ABB_VDLGAIN];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
856 l1_config.params.sidetone = abb[ABB_SIDETONE];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
857 l1_config.params.ctrl1 = abb[ABB_CTRL1];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
858 l1_config.params.ctrl2 = abb[ABB_CTRL2];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
859 l1_config.params.ctrl3 = abb[ABB_CTRL3];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
860 l1_config.params.ctrl4 = abb[ABB_CTRL4];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
861 l1_config.params.ctrl5 = abb[ABB_CTRL5];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
862 l1_config.params.ctrl6 = abb[ABB_CTRL6];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
863 l1_config.params.popauto = abb[ABB_POPAUTO];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
864 l1_config.params.outen1 = abb[ABB_OUTEN1];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
865 l1_config.params.outen2 = abb[ABB_OUTEN2];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
866 l1_config.params.outen3 = abb[ABB_OUTEN3];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
867 l1_config.params.aulga = abb[ABB_AULGA];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
868 l1_config.params.aurga = abb[ABB_AURGA];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
869 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
870 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
871
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
872
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
873 /************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
874 /* Automatic Gain Control */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
875 /************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
876
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
877 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
878 /* Cust_get_agc_from_IL() */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
879 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
880 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
881 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
882 /* Functionality : returns agc value */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
883 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
884 WORD8 Cust_get_agc_from_IL(UWORD16 radio_freq, UWORD16 agc_index, UWORD8 table_id,UWORD8 lna_off_val)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
885 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
886
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
887 UWORD16 agc_index_temp;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
888
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
889 // radio_freq currently not used
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
890 // this parameter is passed in order to allow band dependent tables for specific RFs
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
891 // (e.g. dual band RF with separate AGC H/W blocks for GSM and DCS)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
892
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
893 agc_index_temp = (agc_index<<1) + (lna_off_val * l1ctl_get_lna_att(radio_freq));
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
894 agc_index= agc_index_temp>>1;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
895 if (agc_index > 120)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
896 agc_index = 120; // Clip agc_index
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
897
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
898 switch (table_id)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
899 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
900 case MAX_ID: return(rf.rx.agc.il2agc_max[agc_index]);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
901 case AV_ID: return(rf.rx.agc.il2agc_av[agc_index]);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
902 case PWR_ID: return(rf.rx.agc.il2agc_pwr[agc_index]);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
903 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
904 return (0);//omaps00090550
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
905 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
906
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
907 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
908 /* Cust_get_agc_band */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
909 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
910 /* Parameters : radio_freq */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
911 /* Return : band number */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
912 /* Functionality : Computes the band for RF calibration */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
913 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
914 /*---------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
915
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
916 #if (CODE_VERSION == SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
917 UWORD16 Cust_get_agc_band(UWORD16 arfcn, UWORD8 gsm_band)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
918 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
919 UWORD16 inline Cust_get_agc_band(UWORD16 arfcn, UWORD8 gsm_band)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
920 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
921 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
922 // WORD32 i =0 ; //omaps00090550
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
923 UWORD8 band_number;
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
924
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
925 for (band_number=0;band_number<RF_RX_CAL_CHAN_SIZE;band_number++)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
926 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
927 if (arfcn <= rf_band[gsm_band].rx.agc_bands[band_number].upper_bound)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
928 return(band_number);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
929 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
930 // Should never happen!
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
931 return(0);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
932 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
933
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
934 #if (L1_FF_MULTIBAND == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
935 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
936 /* Cust_is_band_high */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
937 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
938 /* Parameters : arfcn */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
939 /* Return : 0 if low band */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
940 /* 1 if high band */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
941 /* Functionality : Generic function which return 1 if */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
942 /* arfcn is in the high band */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
943 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
944
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
945 UWORD8 Cust_is_band_high(UWORD16 radio_freq)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
946 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
947 UWORD16 max_carrier;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
948 UWORD8 std = l1_config.std.id;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
949
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
950 max_carrier = band_config[std_config[std].band[0]].max_carrier;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
951
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
952 return(((radio_freq >= l1_config.std.first_radio_freq) &&
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
953 (radio_freq < (l1_config.std.first_radio_freq + max_carrier))) ? MULTI_BAND1 : MULTI_BAND2);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
954 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
955 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
956
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
957 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
958 /* l1ctl_encode_delta2() */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
959 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
960 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
961 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
962 /* Functionality : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
963 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
964 WORD8 l1ctl_encode_delta2(UWORD16 radio_freq)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
965 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
966 WORD8 delta2_freq;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
967 UWORD16 i;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
968 UWORD16 arfcn;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
969 #if (L1_FF_MULTIBAND == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
970 UWORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
971
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
972 band = Cust_is_band_high(radio_freq);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
973 arfcn = Convert_l1_radio_freq(radio_freq);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
974 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
975 WORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
976 // Corrected for input being rf_freq and not l1_freq
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
977 arfcn = rf_convert_l1freq_to_arfcn_rfband(rf_convert_rffreq_to_l1freq(radio_freq), &band);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
978 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
979
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
980 i = Cust_get_agc_band(arfcn,band); //
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
981 delta2_freq = rf_band[band].rx.agc_bands[i].agc_calib;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
982
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
983 //temperature compensation
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
984 for (i=0;i<RF_RX_CAL_TEMP_SIZE;i++)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
985 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
986 if ((WORD16)adc.converted[ADC_RFTEMP] <= rf_band[band].rx.temp[i].temperature)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
987 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
988 delta2_freq += rf_band[band].rx.temp[i].agc_calib;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
989 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
990 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
991 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
992
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
993 return(delta2_freq);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
994 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
995
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
996 #if (L1_FF_MULTIBAND == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
997 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
998 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
999 /* l1ctl_get_g_magic() */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1000 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1001 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1002 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1003 /* Functionality : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1004 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1005 UWORD16 l1ctl_get_g_magic(UWORD16 radio_freq)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1006 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1007 // Corrected for input being rf_freq and not l1_freq
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1008 return (rf_band[rf_subband2band[rf_convert_rffreq_to_l1subband(radio_freq)]].rx.rx_cal_params.g_magic);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1009 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1010
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1011
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1012 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1013 /* l1ctl_get_lna_att() */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1014 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1015 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1016 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1017 /* Functionality : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1018 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1019 UWORD16 l1ctl_get_lna_att(UWORD16 radio_freq)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1020 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1021 // The function is provided with rf_freq as input so
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1022 // convert rf_freq to l1_subband then convert l1_subband to rf_band and index into rf_band
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1023 return( rf_band[rf_subband2band[rf_convert_rffreq_to_l1subband(radio_freq)]].rx.rx_cal_params.lna_att);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1024 // return (rf_band[rf_convert_l1freq_to_rf_band_idx(radio_freq)].rx.rx_cal_params.lna_att);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1025 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1026 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1027 /* l1ctl_encode_delta1() */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1028 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1029 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1030 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1031 /* Functionality : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1032 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1033 WORD8 l1ctl_encode_delta1(UWORD16 radio_freq)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1034 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1035 return 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1036 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1037 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1038 /* l1ctl_encode_lna() */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1039 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1040 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1041 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1042 /* Functionality : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1043 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1044 void l1ctl_encode_lna( UWORD8 input_level,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1045 UWORD8 *lna_state,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1046 UWORD16 radio_freq)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1047 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1048
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1049 /*** LNA Hysteresis is implemented as following :
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1050
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1051 |
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1052 On|---<>----+-------+
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1053 | | |
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1054 LNA | | |
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1055 | ^ v
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1056 | | |
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1057 | | |
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1058 Off| +-------+----<>-----
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1059 +--------------------------------
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1060 50 40 30 20 input_level /-dBm
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1061 THR_HIGH THR_LOW ***/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1062 WORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1063 // Corrected for input to be rf_freq and not l1_freq
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1064 band = rf_subband2band[rf_convert_rffreq_to_l1subband(radio_freq)];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1065 if ( input_level > rf_band[band].rx.rx_cal_params.lna_switch_thr_high) // < -44dBm ?
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1066 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1067 *lna_state = LNA_ON; // lna_off = FALSE
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1068 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1069 else if ( input_level < rf_band[band].rx.rx_cal_params.lna_switch_thr_low) // > -40dBm ?
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1070 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1071 *lna_state = LNA_OFF; // lna off = TRUE
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1072 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1073 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1074
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1075 UWORD8 l1ctl_get_iqswap(UWORD16 rf_freq)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1076 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1077 return(rf_band[rf_subband2band[rf_convert_rffreq_to_l1subband(rf_freq)]].swap_iq);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1078 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1079
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1080 #endif //if L1_FF_MULTIBAND == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1081
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1082 /************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1083 /* TX Management */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1084 /************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1085 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1086 /* Cust_get_ramp_tab */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1087 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1088 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1089 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1090 /* Functionality :
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1091 Notes:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1092 Cal+
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1093 APCRAM : Dwn(15:11)Up(10:6)Forced(0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1094 Locosto:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1095 APCRAM: Dwn(15:8)Up(7:0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1096
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1097 */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1098 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1099
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1100 void Cust_get_ramp_tab(API *a_ramp, UWORD8 txpwr_ramp_up, UWORD8 txpwr_ramp_down, UWORD16 radio_freq)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1101 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1102 UWORD16 index_up, index_down,j, arfcn;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1103 #if (L1_FF_MULTIBAND == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1104 UWORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1105
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1106 band = Cust_is_band_high(radio_freq);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1107 arfcn = Convert_l1_radio_freq(radio_freq);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1108 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1109 WORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1110 // Corrected for input being rf_freq and not l1_freq
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1111 arfcn = rf_convert_l1freq_to_arfcn_rfband(rf_convert_rffreq_to_l1freq(radio_freq), &band);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1112 #endif //if( L1_FF_MULTIBAND == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1113
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1114 index_up = rf_band[band].tx.levels[txpwr_ramp_up].ramp_index;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1115 index_down = rf_band[band].tx.levels[txpwr_ramp_down].ramp_index;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1116
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
1117 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3))
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1118 for (j=0; j<16; j++)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1119 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1120 a_ramp[j]=((rf_band[band].tx.ramp_tables[index_down].ramp_down[j])<<11) |
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1121 ((rf_band[band].tx.ramp_tables[index_up].ramp_up[j]) << 6) |
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1122 0x14;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1123 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1124 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1125
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1126 #if (RF_FAM == 61)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1127 // 20 Coeff each 8 (RampDown) + 8 (RampUp)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1128 for (j=0; j<20; j++)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1129 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1130 a_ramp[j]=( (255 - (rf_band[band].tx.ramp_tables[index_down].ramp_down[j]) ) <<8) |
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1131 ((rf_band[band].tx.ramp_tables[index_up].ramp_up[j])) ;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1132 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1133 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1134 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1135
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1136 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1137 /* get_pwr_data */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1138 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1139 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1140 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1141 /* Functionality : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1142 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1143
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
1144 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3) || (RF_FAM == 61))
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1145 UWORD16 Cust_get_pwr_data(UWORD8 txpwr, UWORD16 radio_freq
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1146 #if (REL99 && FF_PRF)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1147 , UWORD8 number_uplink_timeslot
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1148 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1149 )
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1150 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1151
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1152 UWORD16 i,j;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1153 UWORD16 arfcn;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1154
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1155 T_TX_LEVEL *a_tx_levels;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1156
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1157 #if (APC_VBAT_COMP == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1158 static UWORD16 apc_max_value = APC_MAX_VALUE;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1159 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1160
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1161 #if(ORDER2_TX_TEMP_CAL==1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1162 WORD16 pwr_data;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1163 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1164 UWORD16 pwr_data;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1165 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1166
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1167 #if (L1_FF_MULTIBAND == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1168 UWORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1169 band = Cust_is_band_high(radio_freq);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1170 arfcn = Convert_l1_radio_freq(radio_freq);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1171 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1172 WORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1173 // Corrected for input being rf_freq and not l1_freq
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1174 arfcn = rf_convert_l1freq_to_arfcn_rfband(rf_convert_rffreq_to_l1freq(radio_freq), &band);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1175 #endif //if( L1_FF_MULTIBAND == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1176
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1177 // band = Cust_is_band_high(radio_freq);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1178 // arfcn = Convert_l1_radio_freq(radio_freq);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1179
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1180 a_tx_levels = &(rf_band[band].tx.levels[txpwr]); // get pointer to rf tx structure
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1181
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1182 #if REL99
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1183 #if FF_PRF
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1184 // uplink power reduction feature which decrease power level in case of uplink multislot
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1185 a_tx_levels = Cust_get_uplink_apc_power_reduction(band, number_uplink_timeslot, a_tx_levels);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1186 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1187 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1188
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1189 // get uncalibrated apc
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1190 pwr_data = a_tx_levels->apc;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1191
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1192 i = a_tx_levels->chan_cal_index; // get index for channel compensation
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1193 j=0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1194
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1195 while (arfcn > rf_band[band].tx.chan_cal_table[i][j].arfcn_limit)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1196 j++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1197
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1198 // channel calibrate apc
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1199 pwr_data = ((UWORD32) (pwr_data * rf_band[band].tx.chan_cal_table[i][j].chan_cal))/128;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1200
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1201 // temperature compensate apc
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1202 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1203 T_TX_TEMP_CAL *pt;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1204
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1205 pt = rf_band[band].tx.temp;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1206 while (((WORD16)adc.converted[ADC_RFTEMP] > pt->temperature) && ((pt-rf_band[band].tx.temp) < (RF_TX_CAL_TEMP_SIZE-1)))
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1207 pt++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1208 #if(ORDER2_TX_TEMP_CAL==1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1209 pwr_data += (txpwr*(pt->a*txpwr + pt->b) + pt->c) / 64; //delta apc = ax^2+bx+c
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1210 if(pwr_data < 0) pwr_data = 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1211 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1212 pwr_data += pt->apc_calib;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1213 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1214 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1215
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1216 // Vbat compensate apc
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1217 #if (APC_VBAT_COMP == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1218
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1219 if (adc.converted[ADC_VBAT] < VBAT_LOW_THRESHOLD)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1220 apc_max_value = APC_MAX_VALUE_LOW_BAT;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1221
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1222 else if (adc.converted[ADC_VBAT] > VBAT_HIGH_THRESHOLD)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1223 apc_max_value = APC_MAX_VALUE;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1224
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1225 // else do nothing as Vbat is staying between VBAT_LOW_THRESHOLD and
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1226 // VBAT_HIGH_THRESHOLD -> max APC value is still the same than previous one
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1227
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1228 if (pwr_data > apc_max_value)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1229 pwr_data = apc_max_value;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1230 #endif // APC_VBAT_COMP == 1
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1231
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1232 return(pwr_data);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1233 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1234 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1235
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1236
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1237 #if(REL99 && FF_PRF)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1238
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1239 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1240 /* Cust_get_uplink_apc_power_reduction */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1241 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1242 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1243 /* - frenquency band */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1244 /* - modulation type */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1245 /* - number of uplink timeslot */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1246 /* - pointer to radio power control structure */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1247 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1248 /* - pointer to radio power control structure */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1249 /* */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1250 /* Functionality : This function returns a pointer to */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1251 /* the radio power control structure after power */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1252 /* reduction processing. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1253 /* Depending of the number of uplink timeslot, the */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1254 /* analogue power control (apc) value can be reduced */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1255 /* in order to limit effect of terminal heat */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1256 /* dissipation due to power amplifier. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1257 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1258
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1259 T_TX_LEVEL *Cust_get_uplink_apc_power_reduction(UWORD8 band,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1260 UWORD8 number_uplink_timeslot,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1261 T_TX_LEVEL *p_tx_level)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1262 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1263 T_TX_LEVEL *p_power_reduction_tx_level;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1264
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1265 #if TESTMODE
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1266 if ((l1_config.TestMode == TRUE) && (l1_config.tmode.tx_params.power_reduction_enable == FALSE))
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1267 return p_tx_level ; // return without any power reduction
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1268 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1269
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1270 if ((number_uplink_timeslot >= 1) && (number_uplink_timeslot <= MAX_UPLINK_TIME_SLOT))
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1271 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1272 number_uplink_timeslot--; // index start from 0
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1273 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1274 else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1275 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1276 return p_tx_level; // abnormal case we do not apply any power reduction
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1277 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1278
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1279 p_power_reduction_tx_level = &(rf_band[band].tx.levels_power_reduction[number_uplink_timeslot]);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1280
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1281 // We select the lowest power level in order to apply power reduction
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1282 #if (CODE_VERSION != SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1283 if (p_tx_level->apc > p_power_reduction_tx_level->apc) // higher apc value means higher transmit power
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1284 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1285 if (p_tx_level->apc < p_power_reduction_tx_level->apc) // ! for simulation rf apc tables are inverted so comparaison is the reverse
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1286 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1287 return p_power_reduction_tx_level;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1288 else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1289 return p_tx_level;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1290 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1291
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1292 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1293
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1294 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1295 /* Cust_Init_Layer1 */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1296 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1297 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1298 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1299 /* Functionality : Load and boot the DSP */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1300 /* Initialize shared memory and L1 data structures */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1301 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1302
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1303 void Cust_Init_Layer1(void)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1304 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1305 T_MMI_L1_CONFIG cfg;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1306
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1307 // Get the current band configuration from the flash
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1308 #if (OP_WCP==1) && (OP_L1_STANDALONE!=1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1309 extern unsigned char ffs_GetBand();
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1310 cfg.std = ffs_GetBand();
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1311 #else // NO OP_WCP
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1312 // cfg.std = std;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1313 cfg.std = STD;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1314 #endif // OP_WCP
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1315
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1316 cfg.tx_pwr_code = 1;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1317
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1318 // sleep management configuration
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1319
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1320 #if(L1_POWER_MGT == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1321 cfg.pwr_mngt = 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1322 cfg.pwr_mngt_mode_authorized = NO_SLEEP; //Sleep mode
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1323 cfg.pwr_mngt_clocks = 0x5ff; // list of clocks cut in Big Sleep
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1324 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1325 #if(L1_POWER_MGT == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1326 cfg.pwr_mngt = 1;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1327 cfg.pwr_mngt_mode_authorized = ALL_SLEEP; //Sleep mode
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1328 cfg.pwr_mngt_clocks = 0x5ff; // list of clocks cut in Big Sleep
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1329 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1330
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1331
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1332
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1333
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1334
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1335 #if (CODE_VERSION != SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1336 cfg.dwnld = DWNLD; //external define from makefile
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1337 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1338
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1339 l1_initialize(&cfg);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1340
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1341 //add below line for CSR 174476
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
1342 //FC note: not present in Leonardo binary object, will take closer look later
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
1343 trace_info.current_config->l1_dyn_trace = 0; //disable L1 trace after L1 init
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1344
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1345 get_cal_from_nvmem((UWORD8 *)&rf, sizeof(rf), RF_ID);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1346 get_cal_from_nvmem((UWORD8 *)&adc_cal, sizeof(adc_cal), ADC_ID);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1347
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1348 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1349
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1350
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1351 /*****************************************************************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1352 /*************************** TESTMODE functions **********************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1353 /*****************************************************************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1354
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1355
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1356
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1357 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1358 /* madc_hex_2_physical */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1359 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1360 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1361 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1362 /* Functionality : Function to convert MAD hexadecimal */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1363 /* values into physical values */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1364 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1365
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1366 void madc_hex_2_physical (UWORD16 *adc_hex, T_ADC *adc_phy)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1367 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1368 WORD16 i;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1369 UWORD16 y;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1370 WORD16 Smin = 0, Smax = TEMP_TABLE_SIZE-1;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1371 WORD16 index = (TEMP_TABLE_SIZE-1)/2; /* y is the adc code after compensation of ADC slope error introduced by VREF error */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1372
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1373 //store raw ADC values
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1374 memcpy(&adc.raw[0], adc_hex, sizeof(adc.raw));
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1375
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1376 // Convert Vbat [mV] : direct equation with slope and offset compensation
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1377 for (i = ADC_VBAT; i<ADC_RFTEMP; i++)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1378 adc.converted[i] = (((UWORD32)(adc_cal.a[i] * adc.raw[i])) >>10) + adc_cal.b[i];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1379
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1380 /*Convert RF Temperature [Celsius]: binsearch into a table*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1381 y = ((UWORD32)(adc_cal.a[ADC_RFTEMP] * adc.raw[ADC_RFTEMP]))>>8; /* rf.tempcal is the calibration of VREF*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1382 while((Smax-Smin) > 1 )
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1383 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1384 if(y < temperature[index].adc)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1385 Smax=index;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1386 else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1387 Smin=index;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1388
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1389 index = (Smax+Smin)/2;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1390 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1391 adc.converted[ADC_RFTEMP] = temperature[index].temp;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1392
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1393 for (i = ADC_RFTEMP+1; i<ADC_INDEX_END; i++)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1394 adc.converted[i] = (((UWORD32)(adc_cal.a[i] * adc.raw[i])) >>10) + adc_cal.b[i];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1395
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1396 //store converted ADC values
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1397 memcpy(adc_phy, &adc.converted[0], sizeof(adc.raw));
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1398 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1399
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1400
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1401 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1402 /* get_cal_from_nvmem */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1403 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1404 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1405 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1406 /* Functionality : Copy calibrated parameter to */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1407 /* calibration structure in RAM */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1408 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1409
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1410 void get_cal_from_nvmem (UWORD8 *ptr, UWORD16 len, UWORD8 id)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1411 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1412
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1413 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1414
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1415 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1416 /* save_cal_from_nvmem */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1417 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1418 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1419 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1420 /* Functionality : Copy calibrated structure from RAM */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1421 /* into NV memory */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1422 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1423
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1424 UWORD8 save_cal_in_nvmem (UWORD8 *ptr, UWORD16 len, UWORD8 id)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1425 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1426 return (0);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1427 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1428
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1429 #if (TRACE_TYPE == 4)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1430
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1431 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1432 /* l1_cst_l1_parameters */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1433 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1434 /* Parameters : s: pointer on configuration string */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1435 /* Return : nothing: global var are set */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1436 /* Functionality : Set global L1 vars for dynamic trace */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1437 /* and configuration */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1438 /* */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1439 /* This function is called when a CST message is sent */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1440 /* from the Condat Panel. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1441 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1442 void l1_cst_l1_parameters(char *s)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1443 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1444 /*
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1445 a sample command string can be:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1446 L1_PARAMS=<1,2,3,4,5> or
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1447 L1_PARAMS=<1,23,3E32,4,5>
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1448 with n parameters (here: 5 params); n>=1
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1449 parameters are decoded as hexadecimal unsigned integers (UWORD16)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1450 */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1451
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1452 UWORD8 uNParams = 0; /* Number of parameters */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1453 UWORD32 aParam[10]; /* Parameters array */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1454 UWORD8 uIndex = 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1455
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1456 /* *** retrieve all parameters *** */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1457 while (s[uIndex] != '<') uIndex++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1458 uIndex++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1459 aParam[0] = 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1460
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1461 /* uIndex points on 1st parameter */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1462
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1463 while (s[uIndex] != '>')
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1464 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1465 if (s[uIndex] == ',')
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1466 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1467 uNParams++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1468 aParam[uNParams] = 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1469 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1470 else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1471 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1472 /* uIndex points on a parameter char */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1473 UWORD8 uChar = s[uIndex];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1474 aParam[uNParams] = aParam[uNParams] << 4; /* shift 4 bits left */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1475 if ((uChar>='0') && (uChar<='9'))
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1476 aParam[uNParams] += (uChar - '0'); /* retrieve value */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1477 else if ((uChar>='A') && (uChar<='F'))
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1478 aParam[uNParams] += (10 + uChar - 'A'); /* retrieve value */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1479 else if ((uChar>='a') && (uChar<='f'))
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1480 aParam[uNParams] += (10 + uChar - 'a'); /* retrieve value */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1481 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1482
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1483 uIndex++; /* go to next char */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1484 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1485
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1486 /* increment number of params */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1487 uNParams++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1488
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1489 /* *** handle parameters *** */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1490 /*
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1491 1st param: command type
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1492 2nd param: argument for command type
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1493 */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1494 switch (aParam[0])
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1495 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1496 case 0: /* Trace setting */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1497 /* The 2nd parameter contains the trace bitmap*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1498 if (uNParams >=2)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1499 trace_info.current_config->l1_dyn_trace = aParam[1];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1500 else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1501 trace_info.current_config->l1_dyn_trace = 0; /* error case: disable all trace */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1502 Trace_dyn_trace_change();
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1503 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1504 default: /* ignore it */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1505 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1506 } // switch
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1507 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1508
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1509 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1510
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1511 #if ((CHIPSET == 2) || (CHIPSET == 3) || (CHIPSET == 4) || \
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1512 (CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 7) || \
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1513 (CHIPSET == 8) || (CHIPSET == 9) || (CHIPSET == 10) || \
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1514 (CHIPSET == 11) || (CHIPSET == 12))
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1515 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1516 /* power_down_config() : temporary implementation !!! */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1517 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1518 /* Parameters : sleep_mode (NO, SMALL, BIG, DEEP or ALL) */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1519 /* clocks to be cut in BIG sleep */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1520 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1521 /* Functionality : set the l1s variables */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1522 /* l1s.pw_mgr.mode_authorized and l1s.pw_mgr.clocks */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1523 /* according to the desired mode. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1524 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1525 void power_down_config(UWORD8 sleep_mode, UWORD16 clocks)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1526 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1527 #if (OP_L1_STANDALONE == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1528 if(sleep_mode != NO_SLEEP)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1529 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1530 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1531 l1_config.pwr_mngt = PWR_MNGT;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1532 l1s.pw_mgr.mode_authorized = sleep_mode;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1533 l1s.pw_mgr.clocks = clocks;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1534 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1535
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1536 #if (OP_L1_STANDALONE == 0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1537 l1s.pw_mgr.enough_gaug = FALSE;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1538 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1539 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1540 #endif