FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/osx/cust_os.h @ 156:eba29cb0526c
gsm-fw: started on the header dependencies for bsp/abb+spi/abb_core_inth.c
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sun, 17 Nov 2013 08:15:19 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
155:3be2bc80ad38 | 156:eba29cb0526c |
---|---|
1 /* | |
2 +------------------------------------------------------------------------------ | |
3 | File: cust_os.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 communication between L1 and L23 entities. | |
17 | This interface file provides an abstraction of the VSI | |
18 | interface, e.g. to avoid that macros like PALLOC need to be used | |
19 | by the customer. | |
20 +----------------------------------------------------------------------------- | |
21 */ | |
22 #ifndef CUST_OS_H | |
23 #define CUST_OS_H | |
24 | |
25 /*==== INCLUDES =============================================================*/ | |
26 | |
27 /*==== CONSTS ===============================================================*/ | |
28 | |
29 #define OSX_OK 0 | |
30 #define OSX_ERROR -1 | |
31 | |
32 #define L1S_TRACE_DISABLE "L1S_TRACE_DISABLE" | |
33 #define L1S_TRACE_ENABLE "L1S_TRACE_ENABLE" | |
34 #define NO_SPECIAL_MPHC_RXLEV_REQ "NO_SPEC_MPHC_RXLEV_REQ" | |
35 | |
36 /*==== TYPES ================================================================*/ | |
37 | |
38 /* Necessary defintions*/ | |
39 typedef enum | |
40 { | |
41 L1_QUEUE, /* internal L1 communication */ | |
42 DL_QUEUE, /* L1->DL */ | |
43 RR_QUEUE, /* L1->RR */ | |
44 GRR_QUEUE, /* L1->GRR */ | |
45 LLC_QUEUE, /* L1->LLC e.g. ciphering via CCI */ | |
46 SNDCP_QUEUE, /* L1->SNDCP e.g. compression via CCI */ | |
47 GPF_ACI_QUEUE, /* L1->ACI */ | |
48 MAX_OSX_QUEUE | |
49 } T_ENUM_OS_QUEUE; | |
50 | |
51 typedef T_ENUM_OS_QUEUE ENUM_OS_QUEUE; | |
52 | |
53 typedef struct { | |
54 char dummychar; | |
55 } DummyStruct; | |
56 | |
57 typedef struct xSignalHeaderStruct | |
58 { | |
59 int SignalCode; | |
60 int _dummy1; | |
61 int _dummy2; | |
62 int _dummy3; | |
63 DummyStruct *SigP; | |
64 int _dummy4; | |
65 } xSignalHeaderRec; | |
66 | |
67 typedef struct | |
68 { | |
69 int caller; | |
70 int queue_handle; | |
71 unsigned short queue_type; | |
72 } T_OSX_REGISTER; | |
73 | |
74 | |
75 /*==== EXPORTS ==============================================================*/ | |
76 | |
77 /* | |
78 * ================================================= | |
79 * functional interface to the GPF frame environment | |
80 * ================================================= | |
81 */ | |
82 | |
83 /* | |
84 * initialize queue_type to queue_handle conversion table | |
85 */ | |
86 void _osx_init ( void ); | |
87 | |
88 /* | |
89 * dynamic osx configuration | |
90 */ | |
91 int _osx_config ( const char *config ); | |
92 | |
93 /* | |
94 * open an cust_os communication channel | |
95 */ | |
96 #ifdef _OSX_ON_OS_ | |
97 int _osx_open (int,unsigned short,int,int); | |
98 #else | |
99 int _osx_open (int,unsigned short,int); | |
100 #endif | |
101 | |
102 /* | |
103 * allocation of a primitive container with a specific size e.g. sizeof (T_XXX_REQ) | |
104 */ | |
105 xSignalHeaderRec* osx_alloc_prim (unsigned long); | |
106 | |
107 xSignalHeaderRec* int_osx_alloc_prim (int,unsigned long, int); | |
108 | |
109 /* | |
110 * allocation of a memory section with a specific size | |
111 */ | |
112 void* osx_alloc_mem (unsigned long); | |
113 | |
114 void* int_osx_alloc_mem (int,unsigned long); | |
115 | |
116 /* | |
117 * deallocation of one primitive container | |
118 */ | |
119 void osx_free_prim (xSignalHeaderRec*); | |
120 | |
121 void int_osx_free_prim (int,xSignalHeaderRec*); | |
122 | |
123 /* | |
124 * deallocation of one memory section | |
125 */ | |
126 void osx_free_mem (void*); | |
127 | |
128 void int_osx_free_mem (int,void*); | |
129 | |
130 /* | |
131 * reception of a primitive. This function should be called from a thread. It suspends | |
132 * the thread on an empty queue. Queue is specified by an idetifier, | |
133 */ | |
134 xSignalHeaderRec* osx_receive_prim (T_ENUM_OS_QUEUE); | |
135 | |
136 /* | |
137 * reception of a primitive. This function should be called from a thread. It suspends | |
138 * the thread on an empty queue. Queue is specified by its handle | |
139 */ | |
140 xSignalHeaderRec *int_osx_receive_prim (int,int); | |
141 | |
142 /* | |
143 * send a primtive to a queue specified by an identifier (no frame handle!) | |
144 */ | |
145 void osx_send_prim (xSignalHeaderRec*, T_ENUM_OS_QUEUE); | |
146 | |
147 /* | |
148 * send a primtive to a queue specified by a handle | |
149 */ | |
150 void int_osx_send_prim (int,xSignalHeaderRec*, int); | |
151 | |
152 /* | |
153 * send a signal with a special signal code (ULONG) and a pointer to a specific memory | |
154 * area to a queue specified by an identifier | |
155 */ | |
156 void osx_send_sig (unsigned long, void *, T_ENUM_OS_QUEUE); | |
157 | |
158 /* | |
159 * send a signal with a special signal code (ULONG) and a pointer to a specific memory | |
160 * area to a queue specified by its handle | |
161 */ | |
162 void int_osx_send_sig (int,unsigned long,void*,int); | |
163 | |
164 /* | |
165 * ================================================ | |
166 * customizations for the L1 from Texas Instruments | |
167 * ================================================ | |
168 */ | |
169 #define L1C1_QUEUE L1_QUEUE | |
170 #define DLL1_QUEUE DL_QUEUE | |
171 #define RRM1_QUEUE RR_QUEUE | |
172 #define GRRM1_QUEUE GRR_QUEUE | |
173 #define BACK_QUEUE L1_QUEUE | |
174 #define ACI_QUEUE GPF_ACI_QUEUE | |
175 | |
176 #define os_alloc_sig osx_alloc_prim | |
177 #define os_free_sig osx_free_prim | |
178 #define os_send_sig osx_send_prim | |
179 #define os_receive_sig osx_receive_prim | |
180 | |
181 #define MEM_BUF_SIZE(SIG_PAR_SIZE) (SIG_PAR_SIZE + sizeof (xSignalHeaderRec)) | |
182 | |
183 #endif /* CUST_OS_H */ |