comparison src/g23m-aci/aci/cmh_t30.h @ 1:fa8dc04885d8

src/g23m-*: import from Magnetite
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 16 Oct 2020 06:25:50 +0000
parents
children
comparison
equal deleted inserted replaced
0:4e78acac3d88 1:fa8dc04885d8
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : GSM-PS (6147)
4 | Modul : CMH_T30
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 T30.
18 +-----------------------------------------------------------------------------
19 */
20
21 #ifndef CMH_T30_H
22 #define CMH_T30_H
23
24 #ifdef FF_FAX
25
26 /*==== CONSTANTS ==================================================*/
27 #define PRI_MRK (8) /* procedure interrupt marker */
28
29 /*==== TYPES ======================================================*/
30 typedef enum
31 {
32 NO_VLD_FRT = 0, /* not a valid frame type */
33 FRT_DIS, /* DIS frame type */
34 FRT_DTC, /* DTC frame type */
35 FRT_DCS /* DCS frame type */
36 } T_T30_FRTP;
37
38 typedef struct /* negotiated parameters */
39 {
40 T_ACI_F_VR FCSvr;
41 T_ACI_F_BR FCSbr;
42 T_ACI_F_WD FCSwd;
43 T_ACI_F_LN FCSln;
44 T_ACI_F_DF FCSdf;
45 T_ACI_F_EC FCSec;
46 T_ACI_F_BF FCSbf;
47 T_ACI_F_ST FCSst;
48 T_ACI_F_JP FCSjp;
49
50 } T_T30_NGT_PRMS;
51
52 typedef struct entT30Status /* entity status */
53 {
54 T_ACI_CMD_SRC entOwn; /* entity owner */
55 T_ACI_AT_CMD curCmd; /* current command processing */
56 BOOL isTempDisconnected;
57 } T_T30_ENT_STAT;
58
59 /*==== PROTOTYPES =================================================*/
60
61 EXTERN void cmhT30_RTN ( void );
62 EXTERN void cmhT30_RTP ( void );
63 EXTERN void cmhT30_HDLCRpt ( void );
64 EXTERN void cmhT30_ProcIntInst ( void );
65 EXTERN void cmhT30_ProcInt ( void );
66 EXTERN void cmhT30_PageReceivedPRI ( void );
67 EXTERN void cmhT30_ProcEndPRI ( void );
68 EXTERN void cmhT30_DocReceivedPRI ( void );
69 EXTERN void cmhT30_NextPage ( void );
70 EXTERN void cmhT30_NextDoc ( void );
71 EXTERN void cmhT30_PageReceived ( void );
72 EXTERN void cmhT30_FTT ( void );
73 EXTERN void cmhT30_PreambleRcvd ( void );
74 EXTERN void cmhT30_ProcEnd ( void );
75 EXTERN void cmhT30_DocReceived ( void );
76 EXTERN void cmhT30_Disconnected ( void );
77 EXTERN void cmhT30_Disconnect ( void );
78 EXTERN void cmhT30_Deactivated ( void );
79 EXTERN void cmhT30_TransCmpl ( void );
80 EXTERN void cmhT30_CapRmtSite ( void );
81 EXTERN void cmhT30_Activated ( void );
82
83 EXTERN void cmhT30_Failure ( void );
84 EXTERN T_ACI_RETURN cmhT30_Activate ( T_ACI_CMD_SRC srcId,
85 T_ACI_AT_CMD cmdId,
86 SHORT cId );
87 EXTERN T_ACI_RETURN cmhT30_Deactivate ( void );
88 EXTERN T_ACI_RETURN cmhT30_Modify ( void );
89 EXTERN T_ACI_RETURN cmhT30_SendCaps ( T_ACI_CMD_SRC srcId,
90 T_T30_FRTP frmTyp );
91 EXTERN T_ACI_F_BR cmhT30_Chn2BitRate ( void );
92 EXTERN USHORT cmhT30_SelChnRate ( void );
93 EXTERN UBYTE cmhT30_SelHlfRate ( void );
94 EXTERN USHORT cmhT30_SelUsrRate ( void );
95 EXTERN UBYTE cmhT30_SelBitOrder ( T_ACI_CMD_SRC srcId );
96 EXTERN BOOL cmhT30_Chk4TCHAdpt ( void );
97 EXTERN T_ACI_BS_SPEED cmhT30_GetDataRate ( void );
98 EXTERN T_ACI_F_VR cmhT30_GetResolution( void * p,
99 T_T30_FRTP frmTyp );
100 EXTERN T_ACI_F_BR cmhT30_GetBitRate ( void * p,
101 T_T30_FRTP frmTyp );
102 EXTERN T_ACI_F_WD cmhT30_GetPageWidth ( void * p );
103 EXTERN T_ACI_F_LN cmhT30_GetPageLength( void * p );
104 EXTERN T_ACI_F_DF cmhT30_GetDataComp ( void * p );
105 EXTERN T_ACI_F_EC cmhT30_GetErrCorr ( void * p );
106 EXTERN T_ACI_F_BF cmhT30_GetFileTrnsfr( void * p );
107 EXTERN T_ACI_F_ST cmhT30_GetScanTime ( void * p );
108 EXTERN T_ACI_F_JP cmhT30_GetJPEG ( void * p );
109 EXTERN void cmhT30_RstNgtPrms ( void );
110 EXTERN void cmhT30_InitFAXPrms ( T_ACI_CMD_SRC srcId );
111 EXTERN void cmhT30_BuildSndFrm ( T_ACI_CMD_SRC srcId,
112 T_T30_FRTP frmTyp );
113 /* never called !!? EXTERN void cmhT30_PPMRcvd ( UBYTE ppm ); */
114 EXTERN void cmhT30_PRIRcvd ( void );
115 EXTERN void cmhT30_NgtDCEPrms ( T_ACI_CMD_SRC srcId );
116 EXTERN UBYTE cmhT30_GetPpr ( T_ACI_FPS_PPR ppr );
117 EXTERN void cmhT30_FITTimeout ( void );
118 EXTERN void cmhT30_StopFIT ( void );
119 EXTERN void cmhT30_StartFIT ( void );
120
121 /* call-back for DTI Mng */
122 #ifdef DTI
123 EXTERN BOOL T30_connect_dti_cb(UBYTE dti_id, T_DTI_CONN_STATE result_type);
124 #endif /* DTI */
125
126 /*==== EXPORT =====================================================*/
127 #ifdef CMH_T30F_C
128
129 GLOBAL T_T30_ENT_STAT t30EntStat;
130 GLOBAL T_T30_NGT_PRMS t30NgtPrms;
131 GLOBAL T_ACI_FHS_STAT FHSstat;
132 GLOBAL BOOL pageSentFlg = TRUE;
133 GLOBAL BOOL DTCSentFlg = FALSE;
134 GLOBAL BOOL PRIRcvdFlg = FALSE;
135 GLOBAL BOOL ppmPendFlg = FALSE;
136 GLOBAL BOOL FITRunFlg = FALSE;
137
138 #else
139
140 EXTERN T_T30_ENT_STAT t30EntStat;
141 EXTERN T_T30_NGT_PRMS t30NgtPrms;
142 EXTERN T_ACI_FHS_STAT FHSstat;
143 EXTERN BOOL pageSentFlg;
144 EXTERN BOOL DTCSentFlg;
145 EXTERN BOOL PRIRcvdFlg;
146 EXTERN BOOL ppmPendFlg;
147 EXTERN BOOL FITRunFlg;
148 #endif /* CMH_T30F_C */
149
150 #endif /* FF_FAX */
151
152 #endif /* CMH_T30_H */
153
154 /*==== EOF =======================================================*/
155