FreeCalypso > hg > leo2moko-debug
comparison g23m/condat/frame/config/gprsinit.c @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
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 T_PCON_PROPERTIES *pcon = NULL; | |
59 T_MEM_PROPERTIES *mem = NULL; | |
60 | |
61 /*==== FUNCTIONS ==================================================*/ | |
62 | |
63 #ifdef _TARGET_ | |
64 | |
65 void DummyCallback ( void ) | |
66 { | |
67 } | |
68 | |
69 #endif | |
70 /* | |
71 +--------------------------------------------------------------------+ | |
72 | PROJECT : GSM-PS (6147) MODULE : GPRSINIT | | |
73 | STATE : code ROUTINE : Application_Initialize | | |
74 +--------------------------------------------------------------------+ | |
75 | |
76 PURPOSE : Main entry function for NUCLEUS | |
77 | |
78 */ | |
79 /* | |
80 * NOTE: Application_Initalize() must not be used when compiling for target, | |
81 * because it is already defined in a TI lib (as of TI 5.1.1). | |
82 */ | |
83 #ifndef _TARGET_ | |
84 void Application_Initialize (void *first_available_memory) | |
85 { | |
86 | |
87 #ifdef _TARGET_ | |
88 GpInitTarget (); | |
89 Cust_Init_Layer1 (); | |
90 GpInitExternalDevices (); | |
91 SER_tr_Init ( 0, 2, DummyCallback ); | |
92 #endif | |
93 | |
94 StartFrame(); | |
95 | |
96 #ifdef _TARGET_ | |
97 GpUnmaskInterrupts (); | |
98 #endif | |
99 } | |
100 #endif /* !_TARGET_ */ | |
101 | |
102 /* | |
103 +----------------------------------------------------------------------+ | |
104 | PROJECT : xxx MODULE : GPRSINIT | | |
105 | STATE : code ROUTINE : InitializeApplication | | |
106 +----------------------------------------------------------------------+ | |
107 | |
108 PURPOSE : General initialization function to be filled with | |
109 application specific initializations. Function is | |
110 called by the frame after creation of all tasks | |
111 prior to the starting of the tasks. | |
112 | |
113 */ | |
114 void InitializeApplication ( void ) | |
115 { | |
116 /* | |
117 * It has to defined if the allocated partition memory shall be | |
118 * initialized with a dedicated pattern. Select | |
119 * ENABLE_PARTITON_INIT or DISABLE_PARTITON_INIT | |
120 * and a pattern to be used for initialization | |
121 */ | |
122 #ifdef _TARGET_ | |
123 vsi_m_init ( DISABLE_PARTITON_INIT, (char)0x00 ); | |
124 #else | |
125 vsi_m_init ( ENABLE_PARTITON_INIT, (char)0x00 ); | |
126 #endif | |
127 | |
128 #ifdef _TARGET_ | |
129 /* | |
130 * The RTOS tick has to be set.Currently it can be set to | |
131 * SYSTEM_TICK_TDMA_FRAME for the TDMA frame system tick of 4.615ms | |
132 * or | |
133 * SYSTEM_TICK_10_MS for the 10ms tick used for UMTS | |
134 */ | |
135 os_set_tick ( SYSTEM_TICK_TDMA_FRAME ); | |
136 #endif | |
137 } | |
138 |