2 * External IDI interface
4 * Copyright (C) Eicon Technology Corporation, 2000.
6 * Eicon File Revision : 1.0
8 * This software may be used and distributed according to the terms
9 * of the GNU General Public License, incorporated herein by reference.
18 /* typedefs for our data structures */
20 typedef struct get_name_s GET_NAME;
21 typedef struct entity_s ENTITY;
22 typedef struct buffers_s BUFFERS;
24 /* IDI request/callback function pointer */
26 typedef void (* IDI_CALL)(ENTITY *);
29 word length; /* length of data/parameter field */
30 byte P[270]; /* data/parameter field */
33 #define REQ_NAME 0x0100
34 #define BOARD_NAME_LENGTH 9
36 word command; /* command = 0x0100 */
37 byte name[BOARD_NAME_LENGTH];
40 #define REQ_REMOVE 0x0000 /* pointer to word which is 0 */
41 #define REQ_SERIAL 0x0200
43 word command; /* command = 0x0200 */
44 dword serial; /* serial number */
47 #define REQ_POSTCALL 0x0300
49 word command; /* command = 0x0300 */
50 word dummy; /* not used */
51 IDI_CALL callback; /* routine address to call back */
52 ENTITY *contxt; /* ptr to entity to use */
55 #define REQ_XLOG 0x0400 /* structure is card dependent/defined locally */
63 byte Req; /* pending request */
64 byte Rc; /* return code received */
65 byte Ind; /* indication received */
66 byte ReqCh; /* channel of current Req */
67 byte RcCh; /* channel of current Rc */
68 byte IndCh; /* channel of current Ind */
69 byte Id; /* ID used by this entity */
70 byte GlobalId; /* reserved field */
71 byte XNum; /* number of X-buffers */
72 byte RNum; /* number of R-buffers */
73 BUFFERS *X; /* pointer to X-buffer list */
74 BUFFERS *R; /* pointer to R-buffer list */
75 word RLength; /* length of current R-data */
76 DBUFFER *RBuffer; /* buffer of current R-data */
77 byte RNR; /* receive not ready flag */
78 byte complete; /* receive complete status */
83 /* fields used by the driver internally */
84 byte No; /* entity number */
85 byte reserved2; /* reserved field */
86 byte More; /* R/X More flags */
87 byte MInd; /* MDATA coding for this ID */
88 byte XCurrent; /* current transmit buffer */
89 byte RCurrent; /* current receive buffer */
90 word XOffset; /* offset in x-buffer */
91 word ROffset; /* offset in r-buffer */
102 extern void DIVA_DIDD_Read(DESCRIPTOR *, int);
104 /* descriptor type field coding */
105 #define IDI_ADAPTER_S 1
106 #define IDI_ADAPTER_PR 2
107 #define IDI_ADAPTER_DIVA 3
108 #define IDI_ADAPTER_MAESTRA 4
109 #define IDI_ADAPTER_MAESTRAQ 5
110 #define IDI_ADAPTER_MAESTRAP 6
111 #define IDI_VADAPTER 0x40
112 #define IDI_DRIVER 0x80
113 #define IDI_DIMAINT 0xff
115 /* feature bit mask values */
117 #define DI_VOICE 0x0 /* obsolete define */
124 #define DI_CODEC 0x40
125 #define DI_MANAGE 0x80
126 #define DI_V_42 0x0100
127 #define DI_EXTD_FAX 0x0200 /* Extended FAX (ECM, 2D, T.6, Polling) */