FreeCalypso > hg > freecalypso-citrine
comparison g23m-aci/aci/psa_psi.h @ 0:75a11d740a02
initial import of gsm-fw from freecalypso-sw rev 1033:5ab737ac3ad7
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 09 Jun 2016 00:02:41 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:75a11d740a02 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : GSM-PS (6147) | |
4 | Modul : PSA_PSI | |
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 adapter Protocol Stack Interface (PSI ) | |
18 +----------------------------------------------------------------------------- | |
19 */ | |
20 #ifdef FF_PSI | |
21 | |
22 #ifndef PSA_PSI_H | |
23 #define PSA_PSI_H | |
24 | |
25 #include "dti_conn_mng.h" | |
26 #include "psa_uart.h" | |
27 | |
28 #ifndef P_BAT_H | |
29 #ifdef FF_BAT | |
30 #include "p_bat.h" | |
31 #endif /* FF_BAT */ | |
32 #endif | |
33 | |
34 /*==== CONSTANTS ==================================================*/ | |
35 | |
36 #define PSI_DTI_FLOW_OFF 1 | |
37 #define PSI_DTI_SB_BIT 2 | |
38 #define PSI_DTI_SA_BIT 4 | |
39 #define PSI_RING_RUNNING 8 | |
40 | |
41 | |
42 /*==== TYPES ======================================================*/ | |
43 typedef enum{ | |
44 PSI_CONNECT_DTI = 0, | |
45 PSI_DISCONNECT_DTI | |
46 }T_DTI_MNG_PSI_MODE; | |
47 | |
48 | |
49 typedef struct | |
50 { | |
51 T_ACI_DTR_BEHAVIOUR dtr_behaviour; | |
52 BOOL dtr_clearcall; | |
53 BOOL reconnect_to_aci; | |
54 } | |
55 T_PSI_SHRD_PRM; | |
56 | |
57 | |
58 #ifdef FF_BAT | |
59 typedef struct aci_bat_queue_entry_s | |
60 { | |
61 struct aci_bat_queue_entry_s *next; | |
62 T_BAT_cmd_send cmd; /* defined in p_bat.h */ | |
63 U8 client_id; | |
64 } T_aci_bat_queue_entry; | |
65 | |
66 typedef struct | |
67 { | |
68 T_aci_bat_queue_entry *first; | |
69 T_aci_bat_queue_entry *last; | |
70 } T_aci_bat_queue; | |
71 | |
72 typedef struct | |
73 { | |
74 T_BAT_ctrl_params curCmd; /* what is the currently running command */ | |
75 BOOL opened; /* there was a bat_open() at application */ | |
76 BOOL atd_live; /* TRUE while waiting for a final response to ATD */ | |
77 T_desc2 *send_data; /* due to L2P makes our life hard */ | |
78 } T_bat_aci_client_maintain; | |
79 | |
80 #ifdef _SIMULATION_ | |
81 typedef unsigned short T_BAT_client; | |
82 typedef struct | |
83 { | |
84 T_BAT_client client; | |
85 T_BAT_cmd_response *response; | |
86 } T_ACI_BAT_RES; | |
87 #endif | |
88 #endif /* FF_BAT */ | |
89 | |
90 | |
91 typedef struct | |
92 { | |
93 U32 devId; | |
94 UBYTE dlci; | |
95 UBYTE srcId; /* = c_id */ | |
96 T_ACI_DTI_REC_STATE RecState; | |
97 T_ACI_DTI_LINE_STATE LineState; | |
98 #ifdef FF_BAT | |
99 BOOL l2p_configured; /* BAT and L2P */ | |
100 void *rcv_data; /* L2P receive buffer pointer, must be freed after BAT cmd processing */ | |
101 T_desc2 *send_data; /* for control channel (0xFE), due to L2P makes our life hard */ | |
102 T_bat_aci_client_maintain *bat_client; /* BAT client maintenance */ | |
103 U8 active_client; /* which client runs the current command */ | |
104 U8 max_clients; /* maximum # of BAT clients */ | |
105 T_aci_bat_queue *queue; /* pendig BAT commands */ | |
106 U8 *search_str_ptr; /* CPBF and similiar candidates */ | |
107 #ifdef _SIMULATION_ | |
108 T_ACI_BAT_RES res; | |
109 #endif | |
110 #endif /* FF_BAT */ | |
111 BOOL run_cmd; | |
112 BOOL first_output; | |
113 BYTE data_cntr; /* DTI line flags (eg. SB-BIT) */ | |
114 T_ACI_UART_MUX_PARMS *MuxParms; | |
115 BOOL large_type; /* is it a large output ? */ | |
116 T_ACI_DTI_DATA_BUF data_buffer; | |
117 T_ACI_DEVICE_TYPE device_type; | |
118 S16 index1; /* remember for multi line response cmds the current index */ | |
119 S16 index2; /* remember for multi line response cmds the current index */ | |
120 | |
121 } T_ACI_DTI_PRC_PSI; | |
122 | |
123 | |
124 /*==== PROTOTYPES =================================================*/ | |
125 EXTERN void psaPSI_ConnRej ( U32 devId); | |
126 EXTERN void psaPSI_ConnRes ( U32 devId); | |
127 EXTERN void psaPSI_CloseReq ( U32 devId); | |
128 EXTERN void psaPSI_DTICloseReq ( U32 devId, U32 link_id); | |
129 EXTERN void psaPSI_DTIOpenReq ( U32 devId, char* peer_name, | |
130 ULONG link_id, UBYTE dti_direction); | |
131 EXTERN void psaPSI_Dti_Req ( ULONG link_id, UBYTE peer, T_DTI_MNG_PSI_MODE con_mode); | |
132 | |
133 EXTERN void psa_psi_DTI_data_req (T_desc2 *data, T_ACI_DTI_PRC_PSI *src_infos, | |
134 T_DTI_ENTITY_ID peer_id); | |
135 EXTERN void psa_psi_DTI_getdata( UBYTE src_id, T_DTI_ENTITY_ID peer_id); | |
136 EXTERN void psaPSI_DCDreq( UBYTE c_Id, UBYTE line_state ); | |
137 EXTERN BOOL psaPSI_ESCAPEreq( UBYTE c_Id, UBYTE detection ); | |
138 EXTERN void psaPSI_RINGreq( UBYTE c_Id, UBYTE line_state ); | |
139 EXTERN void psaPSI_SetDTIReq( T_DTI_CONN_LINK_ID link_id, T_DTI_ENTITY_ID conn_peer_Id ); | |
140 EXTERN BOOL atiPSI_dti_cb( UBYTE dti_id, T_DTI_CONN_STATE result_type ); | |
141 | |
142 #ifdef PSA_PSIP_C | |
143 GLOBAL T_PSI_SHRD_PRM psiShrdPrm; | |
144 #else | |
145 EXTERN T_PSI_SHRD_PRM psiShrdPrm; | |
146 #endif /* PSA_PSI_C */ | |
147 | |
148 | |
149 /*==== EXPORT =====================================================*/ | |
150 | |
151 #endif /* PSA_PSI_H */ | |
152 #endif /*FF_PSI*/ | |
153 /*==== EOF =======================================================*/ |