comparison src/g23m-aci/aci/cmh_psi.h @ 162:53929b40109c

src/g23m-aci: initial import from TCS3.2/LoCosto
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 11 Oct 2016 02:02:43 +0000
parents
children
comparison
equal deleted inserted replaced
161:4557e2a9c18e 162:53929b40109c
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : GSM-PS (6147)
4 | Modul : CMH_PKTIO
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 command handler of the
18 | psi managment.
19 +-----------------------------------------------------------------------------
20 */
21 #ifdef FF_PSI
22
23 #ifndef CMH_PSI_H
24 #define CMH_PSI_H
25
26
27 #include "aci_lst.h"
28
29 /*==== CONSTANTS ==================================================*/
30
31 #define ACI_DIO_ID_MASK 0x0000FF00 /* bit 08-15: device combination id from DIO Interface layer, v4 */
32
33 /*==== TYPES ======================================================*/
34 typedef enum{
35 PSI_DTI_CLS_CNF,
36 PSI_DTI_CLS_IND
37 }T_PSI_DTI_CLS_TYP;
38
39 typedef union
40 {
41 T_DIO_CAP_SER dio_cap_ser;
42 T_DIO_CAP_SER_MUX dio_cap_ser_mux;
43 T_DIO_CAP_PKT dio_cap_pkt;
44 } T_DIO_CAP_PSI;
45 typedef T_DIO_CAP_PSI T_ACI_PSI_CAP_PAR;
46
47 typedef union
48 {
49 T_DIO_DCB_SER dio_cap_ser;
50 T_DIO_DCB_SER_MUX dio_cap_ser_mux;
51 T_DIO_DCB_PKT dio_cap_pkt;
52 } T_ACI_PSI_CAP;
53
54 typedef union
55 {
56 T_DIO_DCB_SER dio_dcb_ser;
57 T_DIO_DCB_SER_MUX dio_dcb_ser_mux;
58 T_DIO_DCB_PKT dio_dcb_pkt;
59 } T_ACI_PSI_DCB_PAR;
60
61 typedef struct {
62 U32 devId;
63 T_ACI_PSI_DCB_PAR dcbPar;
64 } T_ACI_DEVICE_DCB_ENTRY;
65
66 typedef struct
67 {
68 U32 devId;
69 T_ACI_PSI_CAP_PAR psi_cap;
70 U8 psi_data_mode;
71 } T_ACI_PSI;
72
73 typedef struct
74 {
75 UBYTE src_id;
76 T_DTI_ENTITY_ID entity_to_conn;
77 UBYTE num_entities;
78 T_DTI_CONN_MODE mode;
79 T_DTI_CONN_CB* cb;
80 UBYTE capability;
81 UBYTE cid;
82 T_ACI_AT_CMD last_cmd;
83 }T_ACI_PSI_CALL_TYPE;
84
85 /*==== PROTOTYPES =================================================*/
86 EXTERN void cmhPSI_DTI_OpenCnf (U32 devId, U32 link_id, T_DTI_CONN_RESULT result);
87 EXTERN void cmhPSI_DTI_Close (U32 devId, T_PSI_DTI_CLS_TYP state, U32 link_id);
88 EXTERN void cmhPSI_Line_State_Ind (U32 devId, U16 line_state);
89 EXTERN BOOL cmhPSItest_srcId( UBYTE srcId, void *elem);
90 EXTERN void cmhPSI_getdata ( T_ACI_CMD_SRC srcId );
91
92 EXTERN BOOL cmhPSItest_device (U32 devId, void *elem);
93 EXTERN void cmhPSI_AddDeviceToDcbParameter( U32 devId, U32 dio_driver_type);
94 EXTERN void cmhPSI_erase_src_elem(UBYTE srcId);
95 EXTERN void cmhPSI_RemoveDeviceFromDcbParameter( U32 devId );
96 EXTERN void cmhPSI_CleanDcbParameterList( void );
97 EXTERN T_ACI_DEVICE_DCB_ENTRY* cmhPSI_GetDcbParOverDevice( U32 devId );
98 EXTERN T_ACI_DEVICE_DCB_ENTRY* cmhPSI_GetDeviceParOverSrcID( UBYTE srcId );
99 EXTERN UBYTE cmhPSI_GetParityOverSrcID( UBYTE srcId );
100 EXTERN UBYTE cmhPSI_GetStopBitOverSrcID( UBYTE srcId );
101 EXTERN UBYTE cmhPSI_GetDataBitOverSrcID( UBYTE srcId );
102 EXTERN void cmhPSI_SetDcbParToUnchanged( T_ACI_DEVICE_DCB_ENTRY *dcbntry );
103 EXTERN T_ACI_RETURN cmhPSI_SetDataRate ( UBYTE srcId, T_ACI_BD_RATE rate);
104 EXTERN T_ACI_RETURN cmhPSI_SetCharacterFraming ( UBYTE srcId,
105 T_ACI_BS_FRM format,
106 T_ACI_BS_PAR parity );
107 EXTERN void cmhPSI_Ind (T_ACI_PSI *psi_indic_msg, UBYTE src_id,U32 dio_cap);
108 EXTERN T_ACI_RETURN cmhPSI_SetFlowControl (UBYTE srcId, T_ACI_RX_FLOW_CTRL DCE_by_DTE);
109 EXTERN T_ACI_RETURN cmhPSI_SetEscape( UBYTE srcId, UBYTE detection );
110 EXTERN T_ACI_BS_FRM cmhPSI_GetFktInterfaceFormat( T_ACI_DEVICE_DCB_ENTRY *dcbntry );
111 EXTERN T_ACI_BS_PAR cmhPSI_GetFktInterfaceParity( T_ACI_DEVICE_DCB_ENTRY *dcbntry );
112 EXTERN T_ACI_DTI_PRC_PSI *cmhPSI_find_dlci (T_ACI_LIST *search_list, U32 devId, UBYTE dlci );
113 EXTERN void cmhPSI_lst_init (void);
114 EXTERN void cmhPSI_clean_all_elem(void);
115 EXTERN T_ACI_LIST *psi_src_params;
116 EXTERN T_ACI_LIST *psi_dcb_par;
117
118 EXTERN void psaPSI_SetConfReq( T_ACI_DEVICE_DCB_ENTRY *dcbPar );
119 /*==== EXPORT =====================================================*/
120 #ifdef CMH_PSIF_C
121 GLOBAL T_ACI_PSI_CALL_TYPE psi_ato;
122 #else
123 EXTERN T_ACI_PSI_CALL_TYPE psi_ato;
124 #endif /* CMH_PSIF_C */
125
126 #endif /*CMH_PSI_H*/
127
128 #endif
129 /*==== EOF =======================================================*/