FreeCalypso > hg > fc-magnetite
comparison src/g23m-fad/l2r/tra.h @ 174:90eb61ecd093
src/g23m-fad: initial import from TCS3.2/LoCosto
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 12 Oct 2016 05:40:46 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
173:bf64d785238a | 174:90eb61ecd093 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : CSD (8411) | |
4 | Modul : tra.h | |
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 : Definitions for the Protocol Stack Entity | |
18 | TRA | |
19 +----------------------------------------------------------------------------- | |
20 */ | |
21 | |
22 #ifndef TRA_H | |
23 #define TRA_H | |
24 | |
25 /* | |
26 * States of the entity process MGT | |
27 */ | |
28 #define MGT_IDLE 0 | |
29 #define MGT_INACTIVE 1 | |
30 #define MGT_ACTIVE 2 | |
31 | |
32 /* | |
33 * States of the entity processes UP & DN | |
34 */ | |
35 #define UP_INACTIVE 0 | |
36 #define UP_IDLE 1 | |
37 #define UP_WAIT 2 | |
38 #define UP_SEND 3 | |
39 | |
40 #define DN_INACTIVE 0 | |
41 #define DN_IDLE 1 | |
42 #define DN_WAIT 2 | |
43 #define DN_SEND 3 | |
44 | |
45 /*==== TYPES ======================================================*/ | |
46 | |
47 /* | |
48 * derived constants | |
49 */ | |
50 | |
51 /* global user specific constants */ | |
52 | |
53 #define FL_INACTIVE 0 | |
54 #define FL_ACTIVE 1 | |
55 | |
56 /* | |
57 * Bitoffset for encoding/decoding, taken from RLP | |
58 */ | |
59 #define ENCODE_OFFSET 0 | |
60 | |
61 typedef enum | |
62 { | |
63 NONTRANSP = 0, | |
64 TRANSP = 1 | |
65 } T_MODE; | |
66 | |
67 | |
68 /*lint -e767 macro 'ENTITY_DATA' was defined differently in another module */ | |
69 #define ENTITY_DATA tra_data | |
70 | |
71 /* | |
72 * MANAGEMENT signal processing | |
73 */ | |
74 #ifdef OPTION_MULTITHREAD | |
75 #define sig_mgt_tra_up_send_break_req _ENTITY_PREFIXED(sig_mgt_tra_up_send_break_req) | |
76 #define sig_mgt_tra_up_break_req _ENTITY_PREFIXED(sig_mgt_tra_up_break_req) | |
77 #define sig_mgt_tra_dn_break_req _ENTITY_PREFIXED(sig_mgt_tra_dn_break_req) | |
78 | |
79 #define sig_any_tra_dn_send_break_req _ENTITY_PREFIXED(sig_any_tra_dn_send_break_req) | |
80 #define sig_up_tra_mgt_break_ind _ENTITY_PREFIXED(sig_up_tra_mgt_break_ind) | |
81 #define sig_dn_tra_mgt_break_ind _ENTITY_PREFIXED(sig_dn_tra_mgt_break_ind) | |
82 #endif | |
83 | |
84 EXTERN void sig_mgt_tra_up_send_break_req(USHORT break_len); | |
85 EXTERN void sig_mgt_tra_up_break_req(void); | |
86 EXTERN void sig_mgt_tra_dn_break_req(void); | |
87 | |
88 EXTERN void sig_any_tra_dn_send_break_req (void); | |
89 | |
90 EXTERN void sig_up_tra_mgt_break_ind(USHORT break_len); | |
91 EXTERN void sig_dn_tra_mgt_break_ind(U8 sa, U8 sb, U8 flow, USHORT break_len); | |
92 | |
93 /* | |
94 * MANAGEMENT procedures | |
95 */ | |
96 | |
97 EXTERN void send_tra_deactivate_cnf(void); | |
98 EXTERN void send_tra_dti_cnf(T_TRA_DTI_REQ *tra_dti_req); | |
99 | |
100 /* | |
101 * DN signal processing | |
102 */ | |
103 | |
104 #ifdef OPTION_MULTITHREAD | |
105 #define sig_mgt_tra_dn_dti_conn_setup _ENTITY_PREFIXED(sig_mgt_tra_dn_dti_conn_setup) | |
106 #define sig_mgt_tra_dn_dti_conn_open _ENTITY_PREFIXED(sig_mgt_tra_dn_dti_conn_open) | |
107 #define sig_mgt_tra_dn_dti_disc _ENTITY_PREFIXED(sig_mgt_tra_dn_dti_disc) | |
108 #endif | |
109 | |
110 EXTERN void sig_mgt_tra_dn_dti_conn_setup(void); | |
111 EXTERN void sig_mgt_tra_dn_dti_conn_open(void); | |
112 EXTERN void sig_mgt_tra_dn_dti_disc(void); | |
113 | |
114 /* | |
115 * DN procedures | |
116 */ | |
117 #ifdef OPTION_MULTITHREAD | |
118 #define dl_init _ENTITY_PREFIXED(dl_init) | |
119 #define rbm_init _ENTITY_PREFIXED(rbm_init) | |
120 #define dl_send_data_ind _ENTITY_PREFIXED(dl_send_data_ind ) | |
121 #define dl_prep_data_ind _ENTITY_PREFIXED(dl_prep_data_ind) | |
122 #endif | |
123 | |
124 EXTERN void dl_init(T_TRA_DN *ddl); | |
125 EXTERN void rbm_init(T_TRA_DN *ddl); | |
126 | |
127 EXTERN BOOL dl_send_data_ind (void); | |
128 EXTERN void dl_prep_data_ind (T_FD *pFD); | |
129 | |
130 /* | |
131 * UP signal processing | |
132 */ | |
133 #ifdef OPTION_MULTITHREAD | |
134 #define sig_mgt_tra_up_dti_conn_setup _ENTITY_PREFIXED(sig_mgt_tra_up_dti_conn_setup) | |
135 #define sig_mgt_tra_up_dti_conn_open _ENTITY_PREFIXED(sig_mgt_tra_up_dti_conn_open) | |
136 #define sig_mgt_tra_up_dti_disc _ENTITY_PREFIXED(sig_mgt_tra_up_dti_disc) | |
137 #endif | |
138 | |
139 EXTERN void sig_mgt_tra_up_dti_conn_setup(void); | |
140 EXTERN void sig_mgt_tra_up_dti_conn_open(void); | |
141 EXTERN void sig_mgt_tra_up_dti_disc(void); | |
142 | |
143 /* | |
144 * UP procedures | |
145 */ | |
146 #ifdef OPTION_MULTITHREAD | |
147 #define ul_init _ENTITY_PREFIXED(ul_init ) | |
148 #define snd_data_to_RA _ENTITY_PREFIXED(snd_data_to_RA ) | |
149 #define snd_break_to_RA _ENTITY_PREFIXED(snd_break_to_RA ) | |
150 #define up_start_dti_flow _ENTITY_PREFIXED(up_start_dti_flow) | |
151 #endif | |
152 | |
153 EXTERN void ul_init(T_TRA_UP *dul); | |
154 EXTERN void snd_data_to_RA(); | |
155 EXTERN void snd_break_to_RA(USHORT break_len); | |
156 EXTERN void up_start_dti_flow(void); | |
157 | |
158 EXTERN T_MODE l2r_data_mode; | |
159 | |
160 /* | |
161 * number of signals (max. signalNum which occurs in pei_signal) | |
162 */ | |
163 | |
164 EXTERN DTI_HANDLE l2r_hDTI; /* DTI connection handle for DTI library */ | |
165 | |
166 EXTERN T_FD *tra_get_next_FrameDesc(void); | |
167 | |
168 #endif |