FreeCalypso > hg > fc-magnetite
comparison src/condat3/frame/config/gprsinit.c @ 18:c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 27 Sep 2016 21:25:36 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
17:6323e661f2ed | 18:c8bd5a927942 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : | |
4 | Modul : | |
5 +----------------------------------------------------------------------------- | |
6 | Copyright 2002 Texas Instruments Berlin, AG | |
7 | All rights reserved. | |
8 | | |
9 | This file is confidential and a trade secret of Texas | |
10 | Instruments Berlin, AG | |
11 | The receipt of or possession of this file does not convey | |
12 | any rights to reproduce or disclose its contents or to | |
13 | manufacture, use, or sell anything it may describe, in | |
14 | whole, or in part, without the specific written consent of | |
15 | Texas Instruments Berlin, AG. | |
16 +----------------------------------------------------------------------------- | |
17 | Purpose : Nucleus Entry Function Application_Initialize() | |
18 +----------------------------------------------------------------------------- | |
19 */ | |
20 | |
21 #ifndef _TARGET_ | |
22 #define NEW_ENTITY | |
23 #endif | |
24 | |
25 /*==== INCLUDES ===================================================*/ | |
26 | |
27 #ifdef _TARGET_ | |
28 #include "uart/serialswitch.h" | |
29 #endif | |
30 | |
31 #include "nucleus.h" | |
32 #include "typedefs.h" | |
33 #include "os.h" | |
34 #include "vsi.h" | |
35 #include "os_types.h" | |
36 #include "pcon.h" | |
37 #include "p_mem.h" | |
38 | |
39 /*==== CONSTANTS ==================================================*/ | |
40 | |
41 /*==== TYPES ======================================================*/ | |
42 | |
43 /*==== EXTERMALS ==================================================*/ | |
44 | |
45 #ifndef _TARGET_ | |
46 extern void GpInitTarget (void); | |
47 extern void Cust_Init_Layer1 (void); | |
48 extern void GpUnmaskInterrupts (void); | |
49 extern void GpInitExternalDevices (void); | |
50 #endif | |
51 | |
52 /*==== PROTOTYPES =================================================*/ | |
53 | |
54 short StartFrame (void); | |
55 | |
56 /*==== VARIABLES ==================================================*/ | |
57 | |
58 #ifndef _TARGET_ | |
59 extern T_PCON_PROPERTIES pcon_export; | |
60 T_PCON_PROPERTIES *pcon = &pcon_export; | |
61 #else | |
62 T_PCON_PROPERTIES *pcon = NULL; | |
63 #endif | |
64 | |
65 T_MEM_PROPERTIES *mem = NULL; | |
66 | |
67 /*==== FUNCTIONS ==================================================*/ | |
68 | |
69 #ifdef _TARGET_ | |
70 | |
71 void DummyCallback ( void ) | |
72 { | |
73 } | |
74 | |
75 #endif | |
76 /* | |
77 +--------------------------------------------------------------------+ | |
78 | PROJECT : GSM-PS (6147) MODULE : GPRSINIT | | |
79 | STATE : code ROUTINE : Application_Initialize | | |
80 +--------------------------------------------------------------------+ | |
81 | |
82 PURPOSE : Main entry function for NUCLEUS | |
83 | |
84 */ | |
85 /* | |
86 * NOTE: Application_Initalize() must not be used when compiling for target, | |
87 * because it is already defined in a TI lib (as of TI 5.1.1). | |
88 */ | |
89 #ifndef _TARGET_ | |
90 void Application_Initialize (void *first_available_memory) | |
91 { | |
92 | |
93 #ifdef _TARGET_ | |
94 GpInitTarget (); | |
95 Cust_Init_Layer1 (); | |
96 GpInitExternalDevices (); | |
97 SER_tr_Init ( 0, 2, DummyCallback ); | |
98 #endif | |
99 | |
100 StartFrame(); | |
101 | |
102 #ifdef _TARGET_ | |
103 GpUnmaskInterrupts (); | |
104 #endif | |
105 } | |
106 #endif /* !_TARGET_ */ | |
107 | |
108 /* | |
109 +----------------------------------------------------------------------+ | |
110 | PROJECT : xxx MODULE : GPRSINIT | | |
111 | STATE : code ROUTINE : InitializeApplication | | |
112 +----------------------------------------------------------------------+ | |
113 | |
114 PURPOSE : General initialization function to be filled with | |
115 application specific initializations. Function is | |
116 called by the frame after creation of all tasks | |
117 prior to the starting of the tasks. | |
118 | |
119 */ | |
120 void InitializeApplication ( void ) | |
121 { | |
122 /* | |
123 * It has to defined if the allocated partition memory shall be | |
124 * initialized with a dedicated pattern. Select | |
125 * ENABLE_PARTITON_INIT or DISABLE_PARTITON_INIT | |
126 * and a pattern to be used for initialization | |
127 */ | |
128 #ifdef _TARGET_ | |
129 vsi_m_init ( DISABLE_PARTITON_INIT, (char)0x00 ); | |
130 #else | |
131 vsi_m_init ( ENABLE_PARTITON_INIT, (char)0x00 ); | |
132 #endif | |
133 | |
134 #ifdef _TARGET_ | |
135 /* | |
136 * The RTOS tick has to be set.Currently it can be set to | |
137 * SYSTEM_TICK_TDMA_FRAME for the TDMA frame system tick of 4.615ms | |
138 * or | |
139 * SYSTEM_TICK_10_MS for the 10ms tick used for UMTS | |
140 */ | |
141 os_set_tick ( SYSTEM_TICK_TDMA_FRAME ); | |
142 #endif | |
143 } | |
144 |