annotate gsm-fw/gpf/conf/gpf_misc_init.c @ 854:acc9e473e93f

gsm-fw/g23m-aci/aci/ati_bas.c: +CGxx fix in preparation for enabling MokoFFS
author Space Falcon <falcon@ivan.Harhan.ORG>
date Thu, 30 Apr 2015 02:56:40 +0000
parents 890ffca53a09
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
485
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 /*
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 * This module is our FreeCalypso adaptation of
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3 * g23m/condat/frame/config/gprsinit.c from the Leonardo semi-src.
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 * I renamed it from gprsinit.c to gpf_misc_init.c because nothing
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5 * in this module is specific to the GPRS configuration.
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6 */
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 #include "gpfconf.h"
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 #ifndef _TARGET_
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11 #define NEW_ENTITY
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12 #endif
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14 /*==== INCLUDES ===================================================*/
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16 #ifdef _TARGET_
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17 #include "../../serial/serialswitch.h"
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18 #endif
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
20 #include "../../nucleus/nucleus.h"
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
21 #include "typedefs.h"
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22 #include "os.h"
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
23 #include "vsi.h"
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
24 #include "os_types.h"
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
25 #include "pcon.h"
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
26 #include "p_mem.h"
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
27
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
28 /*==== CONSTANTS ==================================================*/
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
29
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
30 /*==== TYPES ======================================================*/
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
31
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
32 /*==== EXTERMALS ==================================================*/
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
33
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
34 #ifndef _TARGET_
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
35 extern void GpInitTarget (void);
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
36 extern void Cust_Init_Layer1 (void);
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
37 extern void GpUnmaskInterrupts (void);
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
38 extern void GpInitExternalDevices (void);
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
39 #endif
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
40
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
41 /*==== PROTOTYPES =================================================*/
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
42
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
43 short StartFrame (void);
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
44
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
45 /*==== VARIABLES ==================================================*/
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
46
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
47 T_PCON_PROPERTIES *pcon = NULL;
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
48 T_MEM_PROPERTIES *mem = NULL;
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
49
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
50 /*==== FUNCTIONS ==================================================*/
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
51
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
52 #ifdef _TARGET_
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
53
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
54 void DummyCallback ( void )
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
55 {
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
56 }
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
57
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
58 #endif
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
59 /*
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
60 +--------------------------------------------------------------------+
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
61 | PROJECT : GSM-PS (6147) MODULE : GPRSINIT |
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
62 | STATE : code ROUTINE : Application_Initialize |
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
63 +--------------------------------------------------------------------+
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
64
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
65 PURPOSE : Main entry function for NUCLEUS
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
66
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
67 */
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
68 /*
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
69 * NOTE: Application_Initalize() must not be used when compiling for target,
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
70 * because it is already defined in a TI lib (as of TI 5.1.1).
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
71 */
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
72 #ifndef _TARGET_
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
73 void Application_Initialize (void *first_available_memory)
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
74 {
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
75
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
76 #ifdef _TARGET_
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
77 GpInitTarget ();
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
78 Cust_Init_Layer1 ();
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
79 GpInitExternalDevices ();
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
80 SER_tr_Init ( 0, 2, DummyCallback );
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
81 #endif
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
82
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
83 StartFrame();
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
84
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
85 #ifdef _TARGET_
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
86 GpUnmaskInterrupts ();
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
87 #endif
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
88 }
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
89 #endif /* !_TARGET_ */
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
90
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
91 /*
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
92 +----------------------------------------------------------------------+
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
93 | PROJECT : xxx MODULE : GPRSINIT |
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
94 | STATE : code ROUTINE : InitializeApplication |
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
95 +----------------------------------------------------------------------+
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
96
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
97 PURPOSE : General initialization function to be filled with
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
98 application specific initializations. Function is
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
99 called by the frame after creation of all tasks
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
100 prior to the starting of the tasks.
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
101
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
102 */
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
103 void InitializeApplication ( void )
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
104 {
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
105 /*
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
106 * It has to defined if the allocated partition memory shall be
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
107 * initialized with a dedicated pattern. Select
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
108 * ENABLE_PARTITON_INIT or DISABLE_PARTITON_INIT
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
109 * and a pattern to be used for initialization
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
110 */
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
111 #ifdef _TARGET_
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
112 vsi_m_init ( DISABLE_PARTITON_INIT, (char)0x00 );
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
113 #else
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
114 vsi_m_init ( ENABLE_PARTITON_INIT, (char)0x00 );
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
115 #endif
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
116
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
117 #ifdef _TARGET_
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
118 /*
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
119 * The RTOS tick has to be set.Currently it can be set to
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
120 * SYSTEM_TICK_TDMA_FRAME for the TDMA frame system tick of 4.615ms
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
121 * or
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
122 * SYSTEM_TICK_10_MS for the 10ms tick used for UMTS
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
123 */
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
124 os_set_tick ( SYSTEM_TICK_TDMA_FRAME );
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
125 #endif
890ffca53a09 gsm-fw/gpf/conf: started
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
126 }