FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/g23m-gsm/dl/dl.h @ 702:900be07de4e8
dl_com.c compiles
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Fri, 03 Oct 2014 03:25:57 +0000 |
parents | 2f7df7a314f8 |
children |
comparison
equal
deleted
inserted
replaced
701:615fb8847d3f | 702:900be07de4e8 |
---|---|
44 * the following defines have an impact on the behaviour of the layer 2 | 44 * the following defines have an impact on the behaviour of the layer 2 |
45 */ | 45 */ |
46 /* | 46 /* |
47 * DL_TRACE_ENABLED | 47 * DL_TRACE_ENABLED |
48 * is set : Enables the trace feature (buffered or immediately trace) | 48 * is set : Enables the trace feature (buffered or immediately trace) |
49 * isīnt set: Disables the trace feature | 49 * isn't set: Disables the trace feature |
50 */ | 50 */ |
51 #define DL_TRACE_ENABLED | 51 #define DL_TRACE_ENABLED |
52 | 52 |
53 /* | 53 /* |
54 * DL_IMMEDIATE_TRACE | 54 * DL_IMMEDIATE_TRACE |
55 * operates only with enabled trace feature! | 55 * operates only with enabled trace feature! |
56 * is set : Enables unbuffered trace. Write out the trace immediately without | 56 * is set : Enables unbuffered trace. Write out the trace immediately without |
57 * buffering (or rather delayed by signalling to itself while the MS | 57 * buffering (or rather delayed by signalling to itself while the MS |
58 * is in interrupt context state). | 58 * is in interrupt context state). |
59 * isīnt set: Enables buffered trace (write out in idle mode only) | 59 * isn't set: Enables buffered trace (write out in idle mode only) |
60 * Attention: Due to the interrupt context of the uplink and downlink trace | 60 * Attention: Due to the interrupt context of the uplink and downlink trace |
61 this feature requires very fast trace capability. The normal trace | 61 * this feature requires very fast trace capability. The normal trace |
62 transfer rate of 115200 Baud is not sufficient! | 62 * transfer rate of 115200 Baud is not sufficient! |
63 */ | 63 */ |
64 #define DL_IMMEDIATE_TRACE | 64 #define DL_IMMEDIATE_TRACE |
65 | 65 |
66 /* | 66 /* |
67 * DISABLE_MEASREPORT_TRACE | 67 * DISABLE_MEASREPORT_TRACE |
68 * operates only with enabled buffered trace! | 68 * operates only with enabled buffered trace! |
69 * is set : Disables trace of measurement reports | 69 * is set : Disables trace of measurement reports |
70 * isīnt set: Normal trace of measurement reports | 70 * isn't set: Normal trace of measurement reports |
71 #define DISABLE_MEASREPORT_TRACE | 71 #define DISABLE_MEASREPORT_TRACE |
72 */ | 72 */ |
73 /* | 73 /* |
74 * DISABLE_EMPTY_UI | 74 * DISABLE_EMPTY_UI |
75 * operates only with enabled buffered trace! | 75 * operates only with enabled buffered trace! |
76 * is set : Disables trace of empty frames | 76 * is set : Disables trace of empty frames |
77 * isīnt set: Normal trace of empty frames | 77 * isn't set: Normal trace of empty frames |
78 */ | 78 */ |
79 #define DISABLE_EMPTY_UI | 79 #define DISABLE_EMPTY_UI |
80 | 80 |
81 /* | 81 /* |
82 * DELAYED_RELEASE_IND | 82 * DELAYED_RELEASE_IND |
85 * release indication to RR, RR stops the dedicated mode in layer 1). | 85 * release indication to RR, RR stops the dedicated mode in layer 1). |
86 * During the delay, DL sends only dummy frames for some uplink | 86 * During the delay, DL sends only dummy frames for some uplink |
87 * opportunities (see DL_FACCH_RELEASE_DELAY_VALUE and | 87 * opportunities (see DL_FACCH_RELEASE_DELAY_VALUE and |
88 * DL_SDCCH_RELEASE_DELAY_VALUE). The delay stops after the given | 88 * DL_SDCCH_RELEASE_DELAY_VALUE). The delay stops after the given |
89 * count of uplinked dummy frames or at a downlink on this channel. | 89 * count of uplinked dummy frames or at a downlink on this channel. |
90 * isīnt set: No delayed release indication | 90 * isn't set: No delayed release indication |
91 */ | 91 */ |
92 #define DELAYED_RELEASE_IND | 92 #define DELAYED_RELEASE_IND |
93 | 93 |
94 #if defined(DELAYED_RELEASE_IND) | 94 #if defined(DELAYED_RELEASE_IND) |
95 /* | 95 /* |
106 * DELAYED_SABM | 106 * DELAYED_SABM |
107 * is set : To give layer 1 some time to switch the physical channel on FACCH | 107 * is set : To give layer 1 some time to switch the physical channel on FACCH |
108 * DL delays the transmit of the SABM frame. After (re-)establishment | 108 * DL delays the transmit of the SABM frame. After (re-)establishment |
109 * request from RR, DL sends only dummies (return NULL) for the first | 109 * request from RR, DL sends only dummies (return NULL) for the first |
110 * uplink opportunities (see DL_FACCH_SABM_DELAY_VALUE). | 110 * uplink opportunities (see DL_FACCH_SABM_DELAY_VALUE). |
111 * isīnt set: No delayed uplink of the SABM frame. | 111 * isn't set: No delayed uplink of the SABM frame. |
112 */ | 112 */ |
113 #define DELAYED_SABM | 113 #define DELAYED_SABM |
114 | 114 |
115 #if defined(DELAYED_SABM) | 115 #if defined(DELAYED_SABM) |
116 #undef DELAYED_SABM | 116 #undef DELAYED_SABM |
129 /* | 129 /* |
130 * LATE_LEAVING_DEDICATED | 130 * LATE_LEAVING_DEDICATED |
131 * is set : The leaving of dedicated mode happens in latest moment, after | 131 * is set : The leaving of dedicated mode happens in latest moment, after |
132 * the reception of an UA frame after sent of DISC | 132 * the reception of an UA frame after sent of DISC |
133 * or before uplink of the UA frame after reception of a DISC frame. | 133 * or before uplink of the UA frame after reception of a DISC frame. |
134 * isīnt set: In this case the dedicated mode is leaving immediately after | 134 * isn't set: In this case the dedicated mode is leaving immediately after |
135 * the detection of a release (after the incoming L3 message | 135 * the detection of a release (after the incoming L3 message |
136 * CHANNEL RELEASE, or after reception of a DISC frame or before | 136 * CHANNEL RELEASE, or after reception of a DISC frame or before |
137 * the uplink of a DISC frame). | 137 * the uplink of a DISC frame). |
138 */ | 138 */ |
139 #define LATE_LEAVING_DEDICATED | 139 #define LATE_LEAVING_DEDICATED |
140 | 140 |
141 /* | 141 /* |
142 * IFRAME_AS_RR | 142 * IFRAME_AS_RR |
143 * is set : I frame might response with I frame | 143 * is set : I frame might response with I frame |
144 * isīnt set: I frame must response with RR frame | 144 * isn't set: I frame must response with RR frame |
145 */ | 145 */ |
146 #define IFRAME_AS_RR | 146 #define IFRAME_AS_RR |
147 | 147 |
148 /* | 148 /* |
149 * INVOKE_SIGNAL | 149 * INVOKE_SIGNAL |
150 * is set : DL does not send primitives or traces within L1 interrupt context | 150 * is set : DL does not send primitives or traces within L1 interrupt context |
151 * anymore. It sends signals instead. The primitives or traces are | 151 * anymore. It sends signals instead. The primitives or traces are |
152 * delayed until the entity will be in the own context. | 152 * delayed until the entity will be in the own context. |
153 * isīnt set: Primitves or traces are processed immediately even is DL within | 153 * isn't set: Primitves or traces are processed immediately even is DL within |
154 * in L1 interrupt context. | 154 * in L1 interrupt context. |
155 */ | 155 */ |
156 #define INVOKE_SIGNAL | 156 #define INVOKE_SIGNAL |
157 | 157 |
158 /* | 158 /* |
572 #define FRAME_2_4_X | 572 #define FRAME_2_4_X |
573 #elif defined(PEI_H) /* frame version 2.3.x */ | 573 #elif defined(PEI_H) /* frame version 2.3.x */ |
574 typedef USHORT T_SIGNAL_OPC; | 574 typedef USHORT T_SIGNAL_OPC; |
575 #define FRAME_2_3_X | 575 #define FRAME_2_3_X |
576 #else /* frame version unknown */ | 576 #else /* frame version unknown */ |
577 #pragma error("unknown frame version, missing PEI_H or __PEI_H__") | 577 #error "unknown frame version, missing PEI_H or __PEI_H__" |
578 #endif /* frame version */ | 578 #endif /* frame version */ |
579 | 579 |
580 | 580 |
581 /*==== TYPES ======================================================*/ | 581 /*==== TYPES ======================================================*/ |
582 typedef struct | 582 typedef struct |
795 UBYTE sacch_mode; | 795 UBYTE sacch_mode; |
796 T_DL_DATA_IND * dcch0_in_msg; | 796 T_DL_DATA_IND * dcch0_in_msg; |
797 T_DL_DATA_IND * dcch3_in_msg; | 797 T_DL_DATA_IND * dcch3_in_msg; |
798 T_QUEUE dcch0_queue; | 798 T_QUEUE dcch0_queue; |
799 T_QUEUE dcch3_queue; | 799 T_QUEUE dcch3_queue; |
800 BOOL dcch0_unserved; /* storing of indication (unserved DL-DATA_REQīs) */ | 800 BOOL dcch0_unserved; /* storing of indication (unserved DL-DATA_REQ's) */ |
801 BOOL dcch3_unserved; /* for use with DL-ESTABLISHMENT-CNF */ | 801 BOOL dcch3_unserved; /* for use with DL-ESTABLISHMENT-CNF */ |
802 T_RADIO_FRAME l2_frame;/* Buffer for l2_frame and empty l2 frame */ | 802 T_RADIO_FRAME l2_frame;/* Buffer for l2_frame and empty l2 frame */ |
803 BOOL RR_dedicated;/* Flag for RR dedictated mode | 803 BOOL RR_dedicated;/* Flag for RR dedictated mode |
804 * (necessary for measurement reports) */ | 804 * (necessary for measurement reports) */ |
805 ULONG fn; /* last received frame number */ | 805 ULONG fn; /* last received frame number */ |
1223 #endif /* DL_IMMEDIATE_TRACE */ | 1223 #endif /* DL_IMMEDIATE_TRACE */ |
1224 #else | 1224 #else |
1225 #define DL_OFFLINE_TRACE(type, ch, ch_type, data) /* do nothing */ | 1225 #define DL_OFFLINE_TRACE(type, ch, ch_type, data) /* do nothing */ |
1226 #endif /* DL_TRACE_ENABLED */ | 1226 #endif /* DL_TRACE_ENABLED */ |
1227 | 1227 |
1228 #if !defined(_FILE10_) | 1228 /* |
1229 * FreeCalypso change: this __FILE10__ thing is gross, so let's try | |
1230 * removing it. We run gcc from the directory where the source is, | |
1231 * pathname=filename, so __FILE__ should be short enough. | |
1232 */ | |
1233 #if 0 && !defined(_FILE10_) | |
1229 #define __FILE10__ (__FILE__+strlen(__FILE__)-11) | 1234 #define __FILE10__ (__FILE__+strlen(__FILE__)-11) |
1230 #endif /* !_FILE10_ */ | 1235 #endif /* !_FILE10_ */ |
1231 | 1236 |
1232 #if defined(DL_TRACE_ENABLED) || defined(FF_EM_MODE) | 1237 #if defined(DL_TRACE_ENABLED) || defined(FF_EM_MODE) |
1233 EXTERN void com_semaphore_err (void); | 1238 EXTERN void com_semaphore_err (void); |
1241 #endif /* !DL_IMMEDIATE_TRACE */ | 1246 #endif /* !DL_IMMEDIATE_TRACE */ |
1242 #endif /* DL_TRACE_ENABLED || FF_EM_MODE */ | 1247 #endif /* DL_TRACE_ENABLED || FF_EM_MODE */ |
1243 | 1248 |
1244 | 1249 |
1245 #if defined (DL_TRACE_ENABLED) && defined(DL_TRACE_PFREE) | 1250 #if defined (DL_TRACE_ENABLED) && defined(DL_TRACE_PFREE) |
1246 #define MY_PFREE(p) p = my_pfree (p, __LINE__, __FILE10__) | 1251 #define MY_PFREE(p) p = my_pfree (p, __LINE__, __FILE__) |
1247 void* my_pfree(void *pointer, int line, char *file); | 1252 void* my_pfree(void *pointer, int line, char *file); |
1248 #else | 1253 #else |
1249 #define MY_PFREE(p) PFREE(p) | 1254 #define MY_PFREE(p) PFREE(p) |
1250 #endif /* DL_TRACE_ENABLED */ | 1255 #endif /* DL_TRACE_ENABLED */ |
1251 | 1256 |
1272 #define TRACE_ARRAY(array, size, titel) | 1277 #define TRACE_ARRAY(array, size, titel) |
1273 #endif /* ARRAY_TRACE */ | 1278 #endif /* ARRAY_TRACE */ |
1274 #endif /* 0 */ | 1279 #endif /* 0 */ |
1275 | 1280 |
1276 #endif /* !__DL_H__ */ | 1281 #endif /* !__DL_H__ */ |
1277 | |
1278 |