comparison gsm-fw/g23m-aci/aci/cmh_uart.h @ 775:eedbf248bac0

gsm-fw/g23m-aci subtree: initial import from LoCosto source
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 12 Oct 2014 01:45:14 +0000
parents
children
comparison
equal deleted inserted replaced
774:40a721fd9854 775:eedbf248bac0
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : GSM-PS (6147)
4 | Modul : CMH_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 :
18 +-----------------------------------------------------------------------------
19 */
20
21 #ifndef CMH_UART_H
22 #define CMH_UART_H
23
24
25 EXTERN T_ACI_LIST *uart_src_params;
26 EXTERN T_ACI_LIST *uart_com_par;
27
28 /*==== CONSTANTS ==================================================*/
29 #define NOT_SUPPORTED_UART_IO_PA_MARK 4 /* the UART does not support parity mark directly */
30
31 /*==== TYPES ======================================================*/
32
33 typedef struct
34 {
35 UBYTE *data;
36 USHORT data_len;
37 T_ACI_CMD_SRC srcId;
38 } T_ACI_DTI_SEND;
39
40 typedef T_comPar T_ACI_UART_COM_PAR;
41 typedef struct {
42 UBYTE device;
43 T_ACI_UART_COM_PAR comPar;
44
45 } T_ACI_DEVICE_ENTRY;
46
47
48
49 /*==== PROTOTYPES =================================================*/
50
51 /*==== EXPORT =====================================================*/
52 EXTERN void timeout_PlusIPR (void);
53
54 EXTERN BOOL cmhUART_CMUX (T_ACI_CMD_SRC srcId);
55
56 EXTERN void cmhUART_lst_init (void);
57 EXTERN BOOL cmhUARTtest_srcId (UBYTE srcId,
58 void *elem);
59
60 EXTERN BOOL cmhUARTtest_device (UBYTE device,
61 void *elem);
62
63 EXTERN T_ACI_DTI_PRC *cmhUART_find_dlci (T_ACI_LIST *search_list,
64 UBYTE device,
65 UBYTE dlci );
66 EXTERN void cmhUART_startConnection (UBYTE srcId,
67 T_ACI_DEVICE_TYPE device_type);
68
69 EXTERN BOOL cmhUART_stopConnection (UBYTE srcId);
70 EXTERN void cmhUART_getdata ( T_ACI_CMD_SRC srcId );
71
72 EXTERN void cmhUART_ParmsUpdated( UBYTE device );
73 EXTERN void cmhUART_DetectedESC_DTR( UBYTE device, UBYTE dlci, UBYTE cause );
74 EXTERN void cmhUART_init_ipr_params(void);
75
76 /*
77 * functions for cotroling UART parameters (baud rate, character framing, flow control)
78 */
79 EXTERN void cmhUART_AddDeviceToComParameter( UBYTE device );
80 EXTERN void cmhUART_CleanComParameterList( void );
81
82 EXTERN T_ACI_DEVICE_TYPE cmhUART_GetDeviceType( UBYTE srcId );
83 EXTERN BOOL cmhUART_ChangeDeviceType( UBYTE srcId,
84 T_ACI_DEVICE_TYPE device_type );
85 EXTERN T_ACI_DEVICE_ENTRY* cmhUART_GetDeviceParOverDevice( UBYTE device );
86 EXTERN T_ACI_DEVICE_ENTRY* cmhUART_GetDeviceParOverSrcID( UBYTE srcId );
87 EXTERN void cmhUART_SetComParToUnchanged( T_comPar *comPar );
88 EXTERN T_ACI_RETURN cmhUART_SetDataRate ( UBYTE srcId, T_ACI_BD_RATE rate);
89 EXTERN T_ACI_RETURN cmhUART_SetCharacterFraming ( UBYTE srcId,
90 T_ACI_BS_FRM format,
91 T_ACI_BS_PAR parity );
92 EXTERN T_ACI_RETURN cmhUART_SetFlowControl(UBYTE srcId, T_ACI_RX_FLOW_CTRL DCE_by_DTE);
93 EXTERN T_ACI_BS_FRM cmhUART_GetFktInterfaceFormat( T_ACI_UART_COM_PAR *comPar );
94 EXTERN T_ACI_BS_PAR cmhUART_GetFktInterfaceParity( T_ACI_UART_COM_PAR *comPar );
95
96 EXTERN UBYTE cmhUART_GetParityOverSrcID( UBYTE srcId );
97 EXTERN UBYTE cmhUART_GetDataBitOverSrcID( UBYTE srcId );
98 EXTERN UBYTE cmhUART_GetStopBitOverSrcID( UBYTE srcId );
99 EXTERN void cmhUART_lst_exit (void);
100
101
102 #ifdef CMH_UARTF_C
103
104 GLOBAL T_ACI_AT_CMD uartEntcurCmd[CMD_SRC_MAX];
105
106 #else
107
108 EXTERN T_ACI_AT_CMD uartEntcurCmd[];
109
110 #endif /* CMH_UARTF_C */
111
112 #endif /* CMH_UART_H */
113
114 /*==== EOF =======================================================*/