annotate src/condat/frame/config/gprsinit.c @ 58:406a2d2c031a

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