comparison gsm-fw/gpf/frame/frame.h @ 316:79080922d8e4

GPF: FRAME C sources and include files imported from LoCosto source
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Thu, 10 Apr 2014 04:06:05 +0000
parents
children
comparison
equal deleted inserted replaced
315:1b4beffc8055 316:79080922d8e4
1 /*
2 +------------------------------------------------------------------------------
3 | File: frame.h
4 +------------------------------------------------------------------------------
5 | Copyright 2002 Texas Instruments Berlin, AG
6 | All rights reserved.
7 |
8 | This file is confidential and a trade secret of Texas
9 | Instruments Berlin, AG
10 | The receipt of or possession of this file does not convey
11 | any rights to reproduce or disclose its contents or to
12 | manufacture, use, or sell anything it may describe, in
13 | whole, or in part, without the specific written consent of
14 | Texas Instruments Berlin, AG.
15 +-----------------------------------------------------------------------------
16 | Purpose : Definitions for the frame.
17 +-----------------------------------------------------------------------------
18 */
19
20 #ifndef FRAME_H
21 #define FRAME_H
22
23 /*==== INCLUDES =============================================================*/
24
25
26 /*==== TYPES ================================================================*/
27
28 typedef enum { TST_ADR, RCV_ADR, END_OF_COMP_TABLE } T_COMPONENT_ID;
29
30 typedef struct
31 {
32 void *RcvAdr;
33 void *TstAdr;
34 void *DrvListAdr;
35 void *InitFuncAdr;
36 UBYTE *FrameEnvAdr;
37 } T_CONFIGURATION_ADDRESS;
38
39 /*==== CONSTANTS ============================================================*/
40
41 #define PF_OK 0
42 #define PF_ERROR -1
43
44 #define VSI_CALLER 0,
45
46 #ifdef __FRAME_C__
47 #ifndef RUN_INT_RAM
48 char FRM_TST_NAME[RESOURCE_NAMELEN] = { 'T','S','T',0x0,0x0,0x0,0x0,0x0 };
49 char FRM_RCV_NAME[RESOURCE_NAMELEN] = { 'R','C','V',0x0,0x0,0x0,0x0,0x0 };
50 char FRM_SYST_NAME[RESOURCE_NAMELEN] = { 'S','Y','S','T',0x0,0x0,0x0,0x0 };
51 char FRM_PCO_NAME [RESOURCE_NAMELEN] = { 'P','C','O',0x0,0x0,0x0,0x0,0x0 };
52 char const *syst_wrn = "SYSTEM WARNING:";
53 #else
54 extern char FRM_TST_NAME[];
55 extern char FRM_RCV_NAME[];
56 extern char FRM_SYST_NAME[];
57 extern char FRM_PCO_NAME[];
58 #endif
59 #else
60 extern char const *syst_wrn;
61 #endif
62
63 /*
64 * Tokens of the system primitives
65 */
66 #define SYSPRIM_REDIRECT_TOKEN "REDIRECT"
67 #define SYSPRIM_CONNECT_TOKEN "CONNECT"
68 #define SYSPRIM_DISCONNECT_TOKEN "DISCONNECT"
69 #define SYSPRIM_DUPLICATE_TOKEN "DUPLICATE"
70 #define SYSPRIM_CONFIG_TOKEN "CONFIG"
71 #define SYSPRIM_MEMCHECK_TOKEN "MEMCHECK"
72 #define SYSPRIM_RESET_TOKEN "RESET"
73 #define SYSPRIM_VERSION_TOKEN "VERSION"
74 #define SYSPRIM_CLEAR_TOKEN "CLEAR"
75 #define SYSPRIM_NULL_TOKEN "NULL"
76 #define SYSPRIM_TRACECLASS_TOKEN "TRACECLASS"
77 #define SYSPRIM_DISPLAY_TOKEN "DISPLAY"
78 #define SYSPRIM_BOOT_TOKEN "BOOT"
79 #define SYSPRIM_SHOW_MEMORY "MEMORY"
80 #define SYSPRIM_TRC_SUSPEND "TRCSUSPEND"
81 #define SYSPRIM_READ_ROUTING "ROUTING"
82 #define SYSPRIM_STR2IND_VERSION "STR2INDVERSION"
83 #define SYSPRIM_EXIT_TOKEN "EXIT"
84 #define SYSPRIM_REGISTER_TOKEN "REGISTER"
85 #define SYSPRIM_WITHDRAW_TOKEN "WITHDRAW"
86 #define SYSPRIM_STATUS_TOKEN "STATUS"
87 #define SYSPRIM_SUPPRESS_OK "SUPPRESS_OK"
88 #define SYSPRIM_GET_STACK_TIME "GET_STACK_TIME"
89 #define SYSPRIM_IS_STACK_TIME "IS_STACK_TIME"
90 #define SYSPRIM_READ_FFS_DAR "READ_DAR_FILE"
91 #define SYSPRIM_SELECT_TIME_TDMA "TIME_TDMA"
92 #define SYSPRIM_CHECK_OWNER "PPM_CHECK_OWNER"
93 #define SYSPRIM_TST_SYNC_REQ "TST_SYNC_REQ"
94 #define SYSPRIM_TST_SYNC_CNF "TST_SYNC_CNF"
95 #define SYSPRIM_TST_SYNC_REJ "TST_SYNC_REJ"
96 #define SYSPRIM_ROUTE_DESCLIST "ROUTE_DESCLIST"
97 #define SYSPRIM_READ_COM_MATRIX "READ_COM_MATRIX"
98 #define SYSPRIM_ISOLATE_TOKEN "ISOLATE"
99 #define SYSPRIM_REGISTER_ERR_IND "REG_ERROR_IND"
100 #define SYSPRIM_WITHDRAW_ERR_IND "WITHDRAW_ERROR_IND"
101 #define SYSPRIM_CHECK_DESCLIST "CHECK_DESCLIST"
102 #define SYSPRIM_PCHECK "PCHECK"
103
104
105 #define PERIODIC_TIMER 0x8000
106 #define TIMEOUT_OCCURRED 0x4000
107 #define TIMER_HANDLE_MASK (~(PERIODIC_TIMER|TIMEOUT_OCCURRED))
108
109 /*
110 * message prioritiey
111 */
112 #define MSG_PRIMITIVE_PRIO OS_NORMAL
113 #define MSG_SIGNAL_PRIO OS_URGENT
114 #define MSG_TRACE_PRIO OS_NORMAL
115 /*
116 * length for traces
117 */
118 #define ITRACE_LEN (2*sizeof(USHORT)+1)
119 #define PTRACE_LEN_OPC16 18
120 #define PTRACE_LEN_OPC32 22
121 #define STRACE_LEN 80
122
123 #define TRACE_TEXT_SIZE (sizeof(T_S_HEADER)+TTRACE_LEN)
124 #define TRACE_INDEX_SIZE (sizeof(T_S_HEADER)+ITRACE_LEN)
125 #define TRACE_PRIM_SIZE (sizeof(T_S_HEADER)+PTRACE_LEN_OPC32)
126 #define TRACE_STATE_SIZE (sizeof(T_S_HEADER)+STRACE_LEN)
127
128 /*==== PROTOTYPES ===========================================================*/
129
130 GLOBAL void pf_Init (T_CONFIGURATION_ADDRESS *ConfigAddress);
131 GLOBAL SHORT pf_CreateAllEntities (void);
132 GLOBAL SHORT pf_StartAllTasks ( void );
133 GLOBAL void pf_Timeout (T_HANDLE TaskHandle, T_HANDLE EntityHandle, USHORT TimerIndex );
134 GLOBAL void pf_ProcessSystemPrim ( T_HANDLE TaskHandle, T_VOID_STRUCT *pPrim);
135 GLOBAL int pf_handle_warning ( USHORT cause, const char * const format,...);
136 GLOBAL void InitializeTimer (void);
137 GLOBAL void InitializeTrace (void);
138 GLOBAL void TracePoolstatus (T_HANDLE Caller );
139 GLOBAL void InitializePPM (void);
140 GLOBAL void InitializeDriverConfig (void);
141
142 #ifdef _TOOLS_
143 extern USHORT pf_get_frameenv (void);
144 void set_stack_time (ULONG time);
145 void get_local_time (ULONG *time);
146 #endif /* _TOOLS_ */
147
148 #endif /* FRAME_H */