annotate gsm-fw/L1/cust0/l1_cust.c @ 541:9c91a1f670bd

gsm-fw/L1/cust0 compiles!
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sat, 02 Aug 2014 04:22:36 +0000
parents 1affe428bf72
children 9dd6ca16f13d
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
541
9c91a1f670bd gsm-fw/L1/cust0 compiles!
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 528
diff changeset
131 /* FreeCalypso configuration */
9c91a1f670bd gsm-fw/L1/cust0 compiles!
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 528
diff changeset
132 #define DWNLD PATCH_DWNLD
9c91a1f670bd gsm-fw/L1/cust0 compiles!
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 528
diff changeset
133 #define STD DUALEXT
9c91a1f670bd gsm-fw/L1/cust0 compiles!
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 528
diff changeset
134
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
135 // Nucleus functions
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
136 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
137 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
138 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
139 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
140 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
141 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
142 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
143
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
144 #define FFS_WORKAROUND 0
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
145
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
146 #if 1 // (FFS_WORKAROUND == 1)
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
147 #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
148 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
149 /* typedef signed int int32;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
150 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
151 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
152 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
153 #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
154 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
155 #endif
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
156 #endif
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
157
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
158 // 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
159 //extern UWORD8 std;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
160 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
161 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
162
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
163 #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
164 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
165 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
166
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
167 #if (CODE_VERSION != SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
168 // Import serial switch configuration
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
169 #if (CHIPSET == 12)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
170 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
171 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
172 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
173 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
174 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
175
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
176 #if(REL99 && FF_PRF)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
177 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
178 UWORD8 number_uplink_timeslot,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
179 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
180 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
181
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
182
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
183 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
184 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
185 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
186 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
187 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
188
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
189 #if (RF_FAM == 61)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
190 #include "drp_api.h"
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
191
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
192 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
193 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
194 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
195 #endif
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 enum {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
198 RF_ID = 0,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
199 ADC_ID = 1
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
200 };
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
201
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
202 #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
203 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
204 /* Parameters: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
205 /* Return: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
206 /* 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
207 /* for each std. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
208 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
209 //omaps00090550 #83 warinng removal
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
210 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
211 { /*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
212 {"",(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
213 {"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
214 {"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
215 {"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
216 {"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
217 #if (RF_FAM == 10)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
218 {"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
219 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
220 {"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
221 };
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
222
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
223 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
224 /* Parameters: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
225 /* Return: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
226 /* 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
227 /* for each std. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
228 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
229 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
230 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
231 /* 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
232 { 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
233 { 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
234 { 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
235 { 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
236 { 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
237 { 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
238 { 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
239 { 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
240 #if (RF_FAM == 10)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
241 { 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
242 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
243 { 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
244 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
245 };
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
246 #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
247
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
248 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
249 /* 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
250 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
251 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
252 #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
253 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
254 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
255 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
256 /* Cust_recover_Os() */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
257 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
258 /* */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
259 /* 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
260 /* ------------ */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
261 /* This function fix the : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
262 /* - system clock */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
263 /* - Nucleus timers */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
264 /* - xxxxxx (customer dependant) */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
265 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
266
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
267 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
268 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
269 #if (CODE_VERSION != SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
270 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
271 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
272 UWORD32 current_system_clock;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
273
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
274 /***************************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
275 // 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
276 /***************************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
277 // Fix System clock ....
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
278 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
279 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
280 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
281
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
282 // 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
283 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
284 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
285 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
286 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
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 // Cust dependant part ... */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
291 /***************************************************/
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 //..............
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
295 return(TRUE);
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 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
299 return(TRUE); //omaps00090550
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
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 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
305 /* Cust_check_system() */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
306 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
307 /* */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
308 /* Description: */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
309 /* ------------ */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
310 /* GSM 1.5 : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
311 /* - 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
312 /* 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
313 /* - 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
314 /* 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
315 /* - 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
316 /* before allowing DEEP SLEEP. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
317 /* - 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
318 /* - choose the sleep mode */
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 /* Return: */
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 /* 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
323 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
324 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
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 (CODE_VERSION != SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
328 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
329 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
330
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
331 #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
332 // 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
333 /* 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
334 #if 0
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
335 if(LT_Status())
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
336 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
337 //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
338 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
339 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
340 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
341 }
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
342 #endif
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
343
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
344 #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
345 // 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
346 /* FreeCalypso change: no camera */
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
347 #if 0
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
348 if(!cama_sleep_status())
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
349 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
350 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
351 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
352 }
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
353 #endif
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
354
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
355 // 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
356 // 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
357 #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
358 // 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
359 if(SIM_SleepStatus())
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
360 #endif
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 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
363 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
364 if(SER_UartSleepStatus())
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
365 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
366 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
367 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
368 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
369 #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
370 #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
371 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
372 // 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
373 #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
374 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
375 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
376 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
377 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
378 // 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
379 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
380 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
381 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
382 #else // Simulation part
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
383 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
384 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
385 return(CLOCK_STOP); // omaps00090550
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
386 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
387
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
388
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
389 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
390 /* Parameters: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
391 /* Return: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
392 /* 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
393 /* from FFS files. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
394 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
395 //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
396 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
397 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
398 #if (CODE_VERSION != SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
399
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
400 // 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
401 // 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
402 // 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
403 // 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
404 // 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
405 // 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
406 "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
407 "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
408 #if (VCXO_ALGO == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
409 "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
410 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
411 "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
412 #endif
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 "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
415 "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
416 "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
417
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
418 "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
419
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
420 "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
421 "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
422
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
423 #if (RF_FAM ==61)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
424 "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
425 #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
426 "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
427 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
428 #endif
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 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
431 NULL, 0, 0 // terminator
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
432 };
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
433
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
434 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
435 /* Parameters: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
436 /* Return: none */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
437 /* 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
438 /* 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
439 /* 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
440 /* for all bands. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
441 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
442 //omaps00090550 #83 warning removal
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
443 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
444 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
445 // 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
446 // 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
447 // 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
448 // 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
449 // 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
450 // 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
451
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
452 // generic for all bands
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
453 // 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
454 "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
455 "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
456 "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
457 "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
458
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
459 "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
460 "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
461 "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
462 NULL, 0, 0 // terminator
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
463 };
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
464
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
465 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
466 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
467 config_rf_read(type);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
468 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
469 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
470
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
471 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
472 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
473 config_rf_write(type);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
474 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
475 }
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 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
478 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
479 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
480
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
481 while (file->name != NULL)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
482 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
483 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
484 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
485 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
486 file++;
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 }
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 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
491 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
492 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
493
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
494 while (file->name != NULL)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
495 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
496 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
497 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
498 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
499 file++;
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 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
502
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
503 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
504 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
505 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
506 UWORD8 i;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
507 WORD32 offset;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
508 char name[64];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
509 char *p;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
510 #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
511 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
512 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
513
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
514 #if FFS_WORKAROUND == 1
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
515 struct stat_s stat;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
516 UWORD16 time;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
517 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
518 #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
519 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
520 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
521 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
522 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
523 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
524 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
525 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
526 #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
527 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
528 while (f1->name != NULL)
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 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
531 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
532 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
533 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
534 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
535 strcat(name, ".");
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
536 #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 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
538 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
539 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
540 #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
541
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
542 if (read == 1)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
543 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
544 else //write == 0
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
545 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
546 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
547
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
548 // 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
549 #if FFS_WORKAROUND == 1
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
550 stat.inode = 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
551 time = 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
552
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
553 do {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
554 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
555 time += 10;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
556 ffs_stat(name, &stat);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
557 } 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
558 #endif
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 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
561 f1++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
562 }
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 #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
565 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
566 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
567 }
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
570 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
571 /* Cust_init_std() */
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 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
574 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
575 /* 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
576 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
577 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
578 #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
579 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
580 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
581 UWORD8 band1, band2;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
582 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
583
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
584 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
585 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
586
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
587 //get these from std
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
588 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
589 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
590
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
591 // 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
592 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
593
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
594 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
595 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
596
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
597 // 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
598 // 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
599
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
600 config_ffs_read('*');
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
601
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
602 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
603
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
604 if(band2!=0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
605 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
606 else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
607 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
608
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
609 // 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
610 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
611 if(band2!=0)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
612 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
613
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
614 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
615 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
616 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
617 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
618 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
619
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
620 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
621 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
622 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
623 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
624 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
625
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
626 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
627 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
628 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
629 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
630 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
631
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
632 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
633
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
634 // 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
635 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
636
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
637 //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
638 // on a need basis ?
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 #else
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 UWORD8 i;
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 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
645 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
646 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
647 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
648 case RF_GSM900:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
649 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
650 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
651 case RF_GSM850:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
652 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
653 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
654 case RF_DCS1800:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
655 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
656 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
657 case RF_PCS1900:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
658 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
659 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
660 default:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
661 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
662 }
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 config_ffs_read('*');
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 #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
667
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
668
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
669 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
670 /* Cust_init_params() */
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 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
673 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
674 /* 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
675 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
676 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
677 {
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 #if (CODE_VERSION==SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
680 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
681 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
682
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
683 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
684 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
685 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
686 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
687 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
688 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
689
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
690
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
691 // 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
692 // 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
693 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
694 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
695
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_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
697 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
698
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
699 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
700 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
701
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
702 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
703 TA_MAX -
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_synth_setup_time -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
705 EPSILON_OFFS;
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 // 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
708 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
709 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
710
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
711 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
712 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
713
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
714 // 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
715 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
716 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
717
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
718 // 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
719 // 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
720 // 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
721 // 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
722 // 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
723 // ---------
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
724 // Total: 3 qbit
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
725
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
726 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
727 #if (CODE_VERSION == SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
728 // 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
729 1 -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
730 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
731 // 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
732 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
733 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
734 EPSILON_SYNC -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
735 TPU_SLEEP_LOAD -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
736 SERV_OFFS_REST_LOAD -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
737 FB26_ACQUIS_DURATION -
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 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
740
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
741 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
742 PROVISION_TIME -
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
743 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
744 EPSILON_OFFS;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
745
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
746 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
747
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
748 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
749 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
750
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
751 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
752 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
753 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
754 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
755 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
756
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
757 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
758 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
759 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
760 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
761
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
762 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
763 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
764 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
765 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
766
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
767 #if (CODE_VERSION == SIMULATION)
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_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
770 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
771 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
772 #if (VCXO_ALGO == 1)
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_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
774 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
775 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
776 #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
777 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
778 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
779 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
780 #endif /* NEW_SNR_THRESHOLD */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
781 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
782 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
783 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
784 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
785 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
786 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
787
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
788 #if DCO_ALGO
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
789 #if (RF_FAM == 10)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
790 // 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
791 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
792 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
793 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
794 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
795 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
796
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
797 #if (ANALOG == 1)
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
798 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
799 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
800 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
801 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
802 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
803 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
804 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
805 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
806 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
807 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
808 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
809 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
810 #endif
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
811 #if (ANALOG == 2)
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
812 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
813 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
814 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
815 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
816 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
817 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
818 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
819 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
820 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
821 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
822 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
823 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
824 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
825 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
826 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
827 #endif
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
828 #if (ANALOG == 3)
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
829 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
830 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
831 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
832 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
833 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
834 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
835 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
836 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
837 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
838 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
839 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
840 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
841 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
842 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
843 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
844 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
845 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
846 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
847 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
848 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
849 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
850 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
851
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
852 #if (RF_FAM == 61)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
853 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
854 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
855 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
856 #endif
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
857 #if (ANALOG == 11)
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
858 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
859 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
860 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
861 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
862 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
863 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
864 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
865 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
866 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
867 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
868 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
869 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
870 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
871 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
872 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
873 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
874 }
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 /* Automatic Gain Control */
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
881 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
882 /* 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
883 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
884 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
885 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
886 /* Functionality : returns agc value */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
887 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
888 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
889 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
890
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
891 UWORD16 agc_index_temp;
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 // 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
894 // 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
895 // (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
896
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
897 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
898 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
899 if (agc_index > 120)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
900 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
901
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
902 switch (table_id)
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 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
905 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
906 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
907 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
908 return (0);//omaps00090550
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
911 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
912 /* Cust_get_agc_band */
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 /* Parameters : radio_freq */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
915 /* Return : band number */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
916 /* 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
917 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
918 /*---------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
919
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
920 #if (CODE_VERSION == SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
921 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
922 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
923 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
924 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
925 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
926 // WORD32 i =0 ; //omaps00090550
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
927 UWORD8 band_number;
517
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
928
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
929 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
930 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
931 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
932 return(band_number);
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 // Should never happen!
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
935 return(0);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
936 }
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 #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
939 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
940 /* Cust_is_band_high */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
941 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
942 /* Parameters : arfcn */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
943 /* 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
944 /* 1 if high band */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
945 /* 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
946 /* 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
947 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
948
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
949 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
950 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
951 UWORD16 max_carrier;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
952 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
953
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
954 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
955
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
956 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
957 (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
958 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
959 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
960
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
961 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
962 /* l1ctl_encode_delta2() */
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 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
965 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
966 /* Functionality : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
967 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
968 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
969 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
970 WORD8 delta2_freq;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
971 UWORD16 i;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
972 UWORD16 arfcn;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
973 #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
974 UWORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
975
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
976 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
977 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
978 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
979 WORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
980 // 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
981 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
982 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
983
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
984 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
985 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
986
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
987 //temperature compensation
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
988 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
989 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
990 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
991 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
992 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
993 break;
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
997 return(delta2_freq);
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1000 #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
1001 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1002 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1003 /* l1ctl_get_g_magic() */
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 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1006 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1007 /* Functionality : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1008 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1009 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
1010 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1011 // 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
1012 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
1013 }
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1016 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1017 /* l1ctl_get_lna_att() */
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 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1020 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1021 /* Functionality : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1022 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1023 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
1024 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1025 // 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
1026 // 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
1027 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
1028 // 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
1029 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1030 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1031 /* l1ctl_encode_delta1() */
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 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1034 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1035 /* Functionality : */
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 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
1038 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1039 return 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1040 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1041 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1042 /* l1ctl_encode_lna() */
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 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1045 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1046 /* Functionality : */
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 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
1049 UWORD8 *lna_state,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1050 UWORD16 radio_freq)
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1053 /*** 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
1054
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1055 |
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1056 On|---<>----+-------+
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 LNA | | |
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1059 | ^ v
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1060 | | |
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1061 | | |
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1062 Off| +-------+----<>-----
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1063 +--------------------------------
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1064 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
1065 THR_HIGH THR_LOW ***/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1066 WORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1067 // 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
1068 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
1069 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
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_ON; // lna_off = FALSE
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 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
1074 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1075 *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
1076 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1077 }
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 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
1080 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1081 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
1082 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1083
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1084 #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
1085
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1086 /************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1087 /* TX Management */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1088 /************************************/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1089 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1090 /* Cust_get_ramp_tab */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1091 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1092 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1093 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1094 /* Functionality :
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1095 Notes:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1096 Cal+
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1097 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
1098 Locosto:
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1099 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
1100
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 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1103
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1104 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
1105 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1106 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
1107 #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
1108 UWORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1109
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1110 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
1111 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
1112 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1113 WORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1114 // 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
1115 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
1116 #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
1117
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1118 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
1119 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
1120
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
1121 #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
1122 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
1123 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1124 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
1125 ((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
1126 0x14;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1127 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1128 #endif
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 #if (RF_FAM == 61)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1131 // 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
1132 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
1133 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1134 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
1135 ((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
1136 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1137 #endif
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1140 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1141 /* get_pwr_data */
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 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1144 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1145 /* Functionality : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1146 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1147
528
1affe428bf72 getting closer to compiling l1_cust.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 523
diff changeset
1148 #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
1149 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
1150 #if (REL99 && FF_PRF)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1151 , UWORD8 number_uplink_timeslot
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1152 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1153 )
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1156 UWORD16 i,j;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1157 UWORD16 arfcn;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1158
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1159 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
1160
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1161 #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
1162 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
1163 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1164
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1165 #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
1166 WORD16 pwr_data;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1167 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1168 UWORD16 pwr_data;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1169 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1170
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1171 #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
1172 UWORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1173 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
1174 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
1175 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1176 WORD8 band;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1177 // 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
1178 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
1179 #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
1180
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1181 // 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
1182 // 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
1183
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1184 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
1185
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1186 #if REL99
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1187 #if FF_PRF
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1188 // 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
1189 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
1190 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1191 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1192
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1193 // get uncalibrated apc
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1194 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
1195
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1196 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
1197 j=0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1198
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1199 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
1200 j++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1201
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1202 // channel calibrate apc
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1203 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
1204
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1205 // temperature compensate apc
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1206 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1207 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
1208
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1209 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
1210 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
1211 pt++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1212 #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
1213 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
1214 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
1215 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1216 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
1217 #endif
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1220 // Vbat compensate apc
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1221 #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
1222
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1223 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
1224 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
1225
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1226 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
1227 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
1228
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1229 // 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
1230 // 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
1231
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1232 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
1233 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
1234 #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
1235
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1236 return(pwr_data);
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1237 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1238 #endif
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1241 #if(REL99 && FF_PRF)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1242
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1243 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1244 /* 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
1245 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1246 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1247 /* - frenquency band */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1248 /* - modulation type */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1249 /* - number of uplink timeslot */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1250 /* - 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
1251 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1252 /* - 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
1253 /* */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1254 /* 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
1255 /* 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
1256 /* reduction processing. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1257 /* 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
1258 /* 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
1259 /* 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
1260 /* 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
1261 /*-------------------------------------------------------*/
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 *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
1264 UWORD8 number_uplink_timeslot,
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1265 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
1266 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1267 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
1268
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1269 #if TESTMODE
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1270 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
1271 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
1272 #endif
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 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
1275 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1276 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
1277 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1278 else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1279 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1280 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
1281 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1282
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1283 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
1284
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1285 // 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
1286 #if (CODE_VERSION != SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1287 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
1288 #else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1289 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
1290 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1291 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
1292 else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1293 return p_tx_level;
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1296 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1297
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1298 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1299 /* Cust_Init_Layer1 */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1300 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1301 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1302 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1303 /* 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
1304 /* 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
1305 /*-------------------------------------------------------*/
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 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
1308 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1309 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
1310
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1311 // 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
1312 #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
1313 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
1314 cfg.std = ffs_GetBand();
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1315 #else // NO OP_WCP
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1316 // cfg.std = std;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1317 cfg.std = STD;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1318 #endif // OP_WCP
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 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
1321
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1322 // sleep management configuration
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1323
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1324 #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
1325 cfg.pwr_mngt = 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1326 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
1327 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
1328 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1329 #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
1330 cfg.pwr_mngt = 1;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1331 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
1332 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
1333 #endif
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1336
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1337
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 #if (CODE_VERSION != SIMULATION)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1340 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
1341 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1342
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1343 l1_initialize(&cfg);
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 //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
1346 //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
1347 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
1348
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1349 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
1350 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
1351
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1352 }
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 /*************************** TESTMODE functions **********************************/
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
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1361 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1362 /* madc_hex_2_physical */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1363 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1364 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1365 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1366 /* 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
1367 /* values into physical values */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1368 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1369
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1370 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
1371 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1372 WORD16 i;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1373 UWORD16 y;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1374 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
1375 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
1376
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1377 //store raw ADC values
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1378 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
1379
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1380 // 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
1381 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
1382 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
1383
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1384 /*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
1385 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
1386 while((Smax-Smin) > 1 )
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1387 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1388 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
1389 Smax=index;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1390 else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1391 Smin=index;
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 index = (Smax+Smin)/2;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1394 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1395 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
1396
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1397 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
1398 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
1399
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1400 //store converted ADC values
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1401 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
1402 }
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1405 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1406 /* get_cal_from_nvmem */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1407 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1408 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1409 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1410 /* 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
1411 /* calibration structure in RAM */
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 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
1415 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1416
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1419 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1420 /* save_cal_from_nvmem */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1421 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1422 /* Parameters : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1423 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1424 /* 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
1425 /* into NV memory */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1426 /*------------------------------------------------------*/
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 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
1429 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1430 return (0);
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
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1433 #if (TRACE_TYPE == 4)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1434
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1435 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1436 /* l1_cst_l1_parameters */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1437 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1438 /* 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
1439 /* 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
1440 /* 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
1441 /* and configuration */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1442 /* */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1443 /* 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
1444 /* from the Condat Panel. */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1445 /*------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1446 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
1447 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1448 /*
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1449 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
1450 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
1451 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
1452 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
1453 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
1454 */
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 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
1457 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
1458 UWORD8 uIndex = 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1459
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1460 /* *** retrieve all parameters *** */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1461 while (s[uIndex] != '<') uIndex++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1462 uIndex++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1463 aParam[0] = 0;
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 /* 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
1466
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1467 while (s[uIndex] != '>')
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1468 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1469 if (s[uIndex] == ',')
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1470 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1471 uNParams++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1472 aParam[uNParams] = 0;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1473 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1474 else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1475 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1476 /* 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
1477 UWORD8 uChar = s[uIndex];
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1478 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
1479 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
1480 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
1481 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
1482 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
1483 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
1484 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
1485 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1486
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1487 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
1488 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1489
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1490 /* increment number of params */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1491 uNParams++;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1492
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1493 /* *** handle parameters *** */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1494 /*
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1495 1st param: command type
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1496 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
1497 */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1498 switch (aParam[0])
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1499 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1500 case 0: /* Trace setting */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1501 /* 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
1502 if (uNParams >=2)
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1503 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
1504 else
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1505 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
1506 Trace_dyn_trace_change();
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1507 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1508 default: /* ignore it */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1509 break;
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1510 } // switch
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1511 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1512
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1513 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1514
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1515 #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
1516 (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
1517 (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
1518 (CHIPSET == 11) || (CHIPSET == 12))
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1519 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1520 /* 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
1521 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1522 /* 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
1523 /* 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
1524 /* Return : */
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1525 /* 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
1526 /* 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
1527 /* 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
1528 /*-------------------------------------------------------*/
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1529 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
1530 {
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1531 #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
1532 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
1533 #endif
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 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
1536 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
1537 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
1538 }
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 #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
1541 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
1542 #endif
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1543 }
eafadfee35b2 gsm-fw/L1/cust?: imported Leonardo, LoCosto and MV100 versions
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1544 #endif