FreeCalypso > hg > leo2moko-debug
comparison g23m/condat/ms/src/aci/psa_uart.h @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : GSM-PS (6147) | |
4 | Modul : PSA_UART | |
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 | |
18 | Data Transmission Interface ( DTI ) | |
19 +----------------------------------------------------------------------------- | |
20 */ | |
21 | |
22 #ifndef PSA_UART_H | |
23 #define PSA_UART_H | |
24 | |
25 | |
26 /*==== CONSTANTS ==================================================*/ | |
27 | |
28 #define UART_DTI_FLOW_OFF 1 | |
29 #define UART_DTI_SB_BIT 2 | |
30 #define UART_DTI_SA_BIT 4 | |
31 #define UART_RING_RUNNING 8 | |
32 | |
33 /*==== TYPES ======================================================*/ | |
34 | |
35 typedef enum | |
36 { | |
37 NOT_INITIALIZED = -1, | |
38 READY_REC, /* ACI is ready to receive datas from DTI */ | |
39 RECEIVING, /* ACI is currently receiving a command line */ | |
40 PROCESSING /* command line is to be processed - no receiving from DTI */ | |
41 } | |
42 T_ACI_DTI_REC_STATE; | |
43 | |
44 typedef enum | |
45 { | |
46 LINE_CONNECTING = 0, /* only during initializing */ | |
47 LINE_CONNECTED, /* enabling communication through DTI */ | |
48 LINE_DISCONNECTED, /* during change uart to mux uart */ | |
49 LINE_TMP_CONNECTED, | |
50 LINE_TMP_DISCONNECTED, /* temporary disconnected */ | |
51 LINE_TMP_DISCONNECTING /* temporary disconnecting */ | |
52 } | |
53 T_ACI_DTI_LINE_STATE; | |
54 | |
55 typedef enum | |
56 { | |
57 DTR_BEHAVIOUR_NotPresent = -1, | |
58 DTR_BEHAVIOUR_Ignore, | |
59 DTR_BEHAVIOUR_CommandMode, | |
60 DTR_BEHAVIOUR_ClearCall | |
61 } | |
62 T_ACI_DTR_BEHAVIOUR; | |
63 | |
64 typedef enum { | |
65 DEVICE_TYPE_UNKNOWN = -1, | |
66 DEVICE_TYPE_URT, | |
67 DEVICE_TYPE_MUX, | |
68 DEVICE_TYPE_BT, | |
69 DEVICE_TYPE_OTHER | |
70 } T_ACI_DEVICE_TYPE; | |
71 | |
72 typedef struct | |
73 { | |
74 T_ACI_DTR_BEHAVIOUR dtr_behaviour; | |
75 BOOL dtr_clearcall; | |
76 BOOL reconnect_to_aci; | |
77 UBYTE escape_seq; | |
78 } | |
79 T_UART_SHRD_PRM; | |
80 | |
81 | |
82 typedef struct | |
83 { | |
84 UBYTE mode; | |
85 UBYTE subset; | |
86 UBYTE port_speed; | |
87 USHORT N1; | |
88 UBYTE T1; | |
89 UBYTE N2; | |
90 UBYTE T2; | |
91 UBYTE T3; | |
92 | |
93 } T_ACI_UART_MUX_PARMS; | |
94 | |
95 #define MAX_DATA_BUFFER_LIFE_TIME 30000 /* 30 sec live time */ | |
96 /* buffer for data buffer, if not possible to send data via DTI */ | |
97 typedef struct | |
98 { | |
99 T_desc2 *data_list; /* list of data buffers */ | |
100 USHORT max_buffer_size; /* size of the current buffer */ | |
101 T_TIME create_time; | |
102 } T_ACI_DTI_DATA_BUF; | |
103 | |
104 typedef struct | |
105 { | |
106 UBYTE device; | |
107 UBYTE dlci; | |
108 UBYTE srcId; /* = c_id */ | |
109 T_ACI_DTI_REC_STATE RecState; | |
110 T_ACI_DTI_LINE_STATE LineState; | |
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 } T_ACI_DTI_PRC; | |
119 | |
120 | |
121 /*==== PROTOTYPES =================================================*/ | |
122 | |
123 EXTERN const void psaUART_DCDreq ( UBYTE c_Id, UBYTE line_state ); | |
124 EXTERN const void psaUART_ESCAPEreq ( UBYTE c_Id, UBYTE line_state ); | |
125 EXTERN const void psaUART_RINGreq ( UBYTE c_Id, UBYTE line_state ); | |
126 | |
127 #ifdef DTI | |
128 EXTERN BOOL atiUART_dti_cb ( UBYTE dti_id, T_DTI_CONN_STATE result_type ); | |
129 EXTERN const void psaDTI_getdata ( UBYTE srcId, T_DTI_ENTITY_ID peer_id ); | |
130 EXTERN const void psaUART_SetDTIReq( T_DTI_CONN_LINK_ID link_id, T_DTI_ENTITY_ID conn_peer_Id ); | |
131 EXTERN const void psaDTI_data_req ( | |
132 T_desc2 *data, | |
133 T_ACI_DTI_PRC *src_infos, | |
134 T_DTI_ENTITY_ID peer_id | |
135 ); | |
136 #endif /* DTI */ | |
137 EXTERN const void psaUART_StartMux ( UBYTE device, | |
138 UBYTE mode, | |
139 UBYTE frame_type, | |
140 USHORT N1, | |
141 UBYTE T1, | |
142 UBYTE N2, | |
143 UBYTE T2, | |
144 UBYTE T3 ); | |
145 EXTERN const void psaUART_MuxRes ( UBYTE device, | |
146 UBYTE dlci, | |
147 USHORT N1 ); | |
148 | |
149 EXTERN const void psaUART_SetParameters( UBYTE device, | |
150 T_comPar *comPar ); | |
151 | |
152 | |
153 #ifdef PSA_UARTP_C | |
154 | |
155 GLOBAL T_UART_SHRD_PRM uartShrdPrm; | |
156 #else | |
157 | |
158 EXTERN T_UART_SHRD_PRM uartShrdPrm; | |
159 #endif /* PSA_UARTP_C */ | |
160 | |
161 /*==== EXPORT =====================================================*/ | |
162 | |
163 #endif /* PSA_UART_H */ | |
164 | |
165 /*==== EOF =======================================================*/ |