• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2005 Meilhaus Electronic GmbH (support@meilhaus.de)
3  *
4  * Source File : medefines.h
5  * Author      : GG (Guenter Gebhardt)  <g.gebhardt@meilhaus.de>
6  * Author      : KG (Krzysztof Gantzke)  <k.gantzke@meilhaus.de>
7  */
8 
9 #ifndef _MEDEFINES_H_
10 #define _MEDEFINES_H_
11 
12 /*==================================================================
13   General
14   ================================================================*/
15 
16 #define ME_VALUE_NOT_USED							0x0
17 #define ME_VALUE_INVALID							~0x0
18 
19 /*==================================================================
20   Defines common to access functions
21   ================================================================*/
22 
23 #define ME_LOCK_RELEASE								0x00010001
24 #define ME_LOCK_SET									0x00010002
25 #define ME_LOCK_CHECK								0x00010003
26 
27 /*==================================================================
28   Defines meOpen function
29   ================================================================*/
30 
31 #define ME_OPEN_NO_FLAGS							0x0
32 
33 /*==================================================================
34   Defines meClose function
35   ================================================================*/
36 
37 #define ME_CLOSE_NO_FLAGS							0x0
38 
39 /*==================================================================
40   Defines meLockDriver function
41   ================================================================*/
42 
43 #define ME_LOCK_DRIVER_NO_FLAGS						0x0
44 
45 /*==================================================================
46   Defines meLockDevice function
47   ================================================================*/
48 
49 #define ME_LOCK_DEVICE_NO_FLAGS						0x0
50 
51 /*==================================================================
52   Defines meLockSubdevice function
53   ================================================================*/
54 
55 #define ME_LOCK_SUBDEVICE_NO_FLAGS					0x0
56 
57 
58 /*==================================================================
59   Defines common to error functions
60   ================================================================*/
61 
62 #define ME_ERROR_MSG_MAX_COUNT						256
63 
64 #define ME_SWITCH_DISABLE							0x00020001
65 #define ME_SWITCH_ENABLE							0x00020002
66 
67 /*==================================================================
68   Defines common to io functions
69   ================================================================*/
70 
71 #define ME_REF_DIO_FIFO_LOW							0x00030001
72 #define ME_REF_DIO_FIFO_HIGH						0x00030002
73 
74 #define ME_REF_CTR_PREVIOUS							0x00040001
75 #define ME_REF_CTR_INTERNAL_1MHZ					0x00040002
76 #define ME_REF_CTR_INTERNAL_10MHZ					0x00040003
77 #define ME_REF_CTR_EXTERNAL							0x00040004
78 
79 #define ME_REF_AI_GROUND							0x00050001
80 #define ME_REF_AI_DIFFERENTIAL						0x00050002
81 
82 #define ME_REF_AO_GROUND							0x00060001
83 
84 #define ME_TRIG_CHAN_DEFAULT						0x00070001
85 #define ME_TRIG_CHAN_SYNCHRONOUS					0x00070002
86 
87 #define ME_TRIG_TYPE_NONE							0x00000000
88 #define ME_TRIG_TYPE_SW								0x00080001
89 #define ME_TRIG_TYPE_THRESHOLD						0x00080002
90 #define ME_TRIG_TYPE_WINDOW							0x00080003
91 #define ME_TRIG_TYPE_EDGE							0x00080004
92 #define ME_TRIG_TYPE_SLOPE							0x00080005
93 #define ME_TRIG_TYPE_EXT_DIGITAL					0x00080006
94 #define ME_TRIG_TYPE_EXT_ANALOG						0x00080007
95 #define ME_TRIG_TYPE_PATTERN						0x00080008
96 #define ME_TRIG_TYPE_TIMER							0x00080009
97 #define ME_TRIG_TYPE_COUNT							0x0008000A
98 #define ME_TRIG_TYPE_FOLLOW							0x0008000B
99 
100 #define ME_TRIG_EDGE_NONE							0x00000000
101 #define ME_TRIG_EDGE_ABOVE							0x00090001
102 #define ME_TRIG_EDGE_BELOW							0x00090002
103 #define ME_TRIG_EDGE_ENTRY							0x00090003
104 #define ME_TRIG_EDGE_EXIT							0x00090004
105 #define ME_TRIG_EDGE_RISING							0x00090005
106 #define ME_TRIG_EDGE_FALLING						0x00090006
107 #define ME_TRIG_EDGE_ANY							0x00090007
108 
109 #define ME_TIMER_ACQ_START							0x000A0001
110 #define ME_TIMER_SCAN_START							0x000A0002
111 #define ME_TIMER_CONV_START							0x000A0003
112 
113 /*==================================================================
114   Defines for meIOFrequencyToTicks function
115   ================================================================*/
116 
117 #define ME_IO_FREQUENCY_TO_TICKS_NO_FLAGS			0x0
118 
119 /*==================================================================
120   Defines for meIOIrqStart function
121   ================================================================*/
122 
123 #define ME_IRQ_SOURCE_DIO_PATTERN					0x000B0001
124 #define ME_IRQ_SOURCE_DIO_MASK						0x000B0002
125 #define ME_IRQ_SOURCE_DIO_LINE						0x000B0003
126 #define ME_IRQ_SOURCE_DIO_OVER_TEMP					0x000B0004
127 
128 #define ME_IRQ_EDGE_NOT_USED						0x00000000
129 #define ME_IRQ_EDGE_RISING							0x000C0001
130 #define ME_IRQ_EDGE_FALLING							0x000C0002
131 #define ME_IRQ_EDGE_ANY								0x000C0003
132 
133 /*==================================================================
134   Defines for meIOIrqStart function
135   ================================================================*/
136 
137 #define ME_IO_IRQ_START_NO_FLAGS					0x000000
138 #define ME_IO_IRQ_START_DIO_BIT						0x000001
139 #define ME_IO_IRQ_START_DIO_BYTE					0x000002
140 #define ME_IO_IRQ_START_DIO_WORD					0x000004
141 #define ME_IO_IRQ_START_DIO_DWORD					0x000008
142 #define ME_IO_IRQ_START_PATTERN_FILTERING			0x000010
143 #define ME_IO_IRQ_START_EXTENDED_STATUS				0x000020
144 
145 /*==================================================================
146   Defines for meIOIrqWait function
147   ================================================================*/
148 
149 #define ME_IO_IRQ_WAIT_NO_FLAGS						0x000000
150 #define ME_IO_IRQ_WAIT_NORMAL_STATUS				0x000001
151 #define ME_IO_IRQ_WAIT_EXTENDED_STATUS				0x000002
152 
153 /*==================================================================
154   Defines for meIOIrqStop function
155   ================================================================*/
156 
157 #define ME_IO_IRQ_STOP_NO_FLAGS						0x000000
158 
159 /*==================================================================
160   Defines for meIOIrqSetCallback function
161   ================================================================*/
162 
163 #define ME_IO_IRQ_SET_CALLBACK_NO_FLAGS				0x0
164 
165 /*==================================================================
166   Defines for meIOResetDevice function
167   ================================================================*/
168 
169 #define ME_IO_RESET_DEVICE_NO_FLAGS					0x0
170 
171 /*==================================================================
172   Defines for meIOResetSubdevice function
173   ================================================================*/
174 
175 #define ME_IO_RESET_SUBDEVICE_NO_FLAGS				0x0
176 
177 /*==================================================================
178   Defines for meIOSingleConfig function
179   ================================================================*/
180 
181 #define ME_SINGLE_CONFIG_DIO_INPUT					0x000D0001
182 #define ME_SINGLE_CONFIG_DIO_OUTPUT					0x000D0002
183 #define ME_SINGLE_CONFIG_DIO_HIGH_IMPEDANCE			0x000D0003
184 #define ME_SINGLE_CONFIG_DIO_SINK					0x000D0004
185 #define ME_SINGLE_CONFIG_DIO_SOURCE					0x000D0005
186 #define ME_SINGLE_CONFIG_DIO_MUX32M					0x000D0006
187 #define ME_SINGLE_CONFIG_DIO_DEMUX32				0x000D0007
188 #define ME_SINGLE_CONFIG_DIO_BIT_PATTERN			0x000D0008
189 
190 #define ME_SINGLE_CONFIG_CTR_8254_MODE_0			0x000E0001
191 #define ME_SINGLE_CONFIG_CTR_8254_MODE_1			0x000E0002
192 #define ME_SINGLE_CONFIG_CTR_8254_MODE_2			0x000E0003
193 #define ME_SINGLE_CONFIG_CTR_8254_MODE_3			0x000E0004
194 #define ME_SINGLE_CONFIG_CTR_8254_MODE_4			0x000E0005
195 #define ME_SINGLE_CONFIG_CTR_8254_MODE_5			0x000E0006
196 
197 #define ME_IO_SINGLE_CONFIG_NO_FLAGS				0x00
198 #define ME_IO_SINGLE_CONFIG_DIO_BIT					0x01
199 #define ME_IO_SINGLE_CONFIG_DIO_BYTE				0x02
200 #define ME_IO_SINGLE_CONFIG_DIO_WORD				0x04
201 #define ME_IO_SINGLE_CONFIG_DIO_DWORD				0x08
202 #define ME_IO_SINGLE_CONFIG_MULTISIG_LED_ON			0x10
203 #define ME_IO_SINGLE_CONFIG_MULTISIG_LED_OFF		0x20
204 #define ME_IO_SINGLE_CONFIG_AI_RMS					0x40
205 #define ME_IO_SINGLE_CONFIG_CONTINUE				0x80
206 
207 /*==================================================================
208   Defines for meIOSingle function
209   ================================================================*/
210 
211 #define ME_IO_SINGLE_NO_FLAGS						0x0
212 #define ME_IO_SINGLE_NONBLOCKING					0x20
213 
214 #define ME_DIR_INPUT								0x000F0001
215 #define ME_DIR_OUTPUT								0x000F0002
216 
217 #define ME_IO_SINGLE_TYPE_NO_FLAGS					0x00
218 #define ME_IO_SINGLE_TYPE_DIO_BIT					0x01
219 #define ME_IO_SINGLE_TYPE_DIO_BYTE					0x02
220 #define ME_IO_SINGLE_TYPE_DIO_WORD					0x04
221 #define ME_IO_SINGLE_TYPE_DIO_DWORD					0x08
222 #define ME_IO_SINGLE_TYPE_TRIG_SYNCHRONOUS			0x10
223 #define ME_IO_SINGLE_TYPE_WRITE_NONBLOCKING			0x20
224 
225 /*==================================================================
226   Defines for meIOStreamConfig function
227   ================================================================*/
228 
229 #define ME_IO_STREAM_CONFIG_NO_FLAGS				0x0
230 #define ME_IO_STREAM_CONFIG_BIT_PATTERN				0x1
231 #define ME_IO_STREAM_CONFIG_WRAPAROUND				0x2
232 #define ME_IO_STREAM_CONFIG_SAMPLE_AND_HOLD			0x4
233 #define ME_IO_STREAM_CONFIG_HARDWARE_ONLY			0x8
234 
235 #define ME_IO_STREAM_CONFIG_TYPE_NO_FLAGS			0x0
236 
237 #define ME_IO_STREAM_TRIGGER_TYPE_NO_FLAGS			0x0
238 
239 /*==================================================================
240   Defines for meIOStreamRead function
241   ================================================================*/
242 
243 #define ME_READ_MODE_BLOCKING						0x00100001
244 #define ME_READ_MODE_NONBLOCKING					0x00100002
245 
246 #define ME_IO_STREAM_READ_NO_FLAGS					0x0
247 #define ME_IO_STREAM_READ_FRAMES					0x1
248 
249 /*==================================================================
250   Defines for meIOStreamWrite function
251   ================================================================*/
252 
253 #define ME_WRITE_MODE_BLOCKING						0x00110001
254 #define ME_WRITE_MODE_NONBLOCKING					0x00110002
255 #define ME_WRITE_MODE_PRELOAD						0x00110003
256 
257 #define ME_IO_STREAM_WRITE_NO_FLAGS					0x00000000
258 
259 /*==================================================================
260   Defines for meIOStreamStart function
261   ================================================================*/
262 
263 #define ME_IO_STREAM_START_NO_FLAGS					0x00000000
264 
265 #define ME_START_MODE_BLOCKING						0x00120001
266 #define ME_START_MODE_NONBLOCKING					0x00120002
267 
268 #define ME_IO_STREAM_START_TYPE_NO_FLAGS			0x0
269 #define ME_IO_STREAM_START_TYPE_TRIG_SYNCHRONOUS	0x1
270 
271 /*==================================================================
272   Defines for meIOStreamStop function
273   ================================================================*/
274 
275 #define ME_IO_STREAM_STOP_NO_FLAGS					0x00000000
276 #define ME_IO_STREAM_STOP_PRESERVE_BUFFERS			0x00000001
277 
278 #define ME_STOP_MODE_IMMEDIATE						0x00130001
279 #define ME_STOP_MODE_LAST_VALUE						0x00130002
280 
281 #define ME_IO_STREAM_STOP_TYPE_NO_FLAGS				0x00000000
282 
283 /*==================================================================
284   Defines for meIOStreamStatus function
285   ================================================================*/
286 
287 #define ME_WAIT_NONE								0x00140001
288 #define ME_WAIT_IDLE								0x00140002
289 
290 #define ME_STATUS_INVALID							0x00000000
291 #define ME_STATUS_IDLE								0x00150001
292 #define ME_STATUS_BUSY								0x00150002
293 #define ME_STATUS_ERROR								0x00150003
294 
295 #define ME_IO_STREAM_STATUS_NO_FLAGS				0x00000000
296 
297 /*==================================================================
298   Defines for meIOStreamSetCallbacks function
299   ================================================================*/
300 
301 #define ME_IO_STREAM_SET_CALLBACKS_NO_FLAGS			0x00000000
302 
303 /*==================================================================
304   Defines for meIOStreamNewValues function
305   ================================================================*/
306 
307 #define ME_IO_STREAM_NEW_VALUES_NO_FLAGS			0x00000000
308 
309 /*==================================================================
310   Defines for meIOTimeToTicks function
311   ================================================================*/
312 
313 #define ME_IO_STREAM_TIME_TO_TICKS_NO_FLAGS			0x00000000
314 
315 /*==================================================================
316   Defines for module types
317   ================================================================*/
318 
319 #define ME_MODULE_TYPE_MULTISIG_NONE				0x00000000
320 #define ME_MODULE_TYPE_MULTISIG_DIFF16_10V			0x00160001
321 #define ME_MODULE_TYPE_MULTISIG_DIFF16_20V			0x00160002
322 #define ME_MODULE_TYPE_MULTISIG_DIFF16_50V			0x00160003
323 #define ME_MODULE_TYPE_MULTISIG_CURRENT16_0_20MA	0x00160004
324 #define ME_MODULE_TYPE_MULTISIG_RTD8_PT100			0x00160005
325 #define ME_MODULE_TYPE_MULTISIG_RTD8_PT500			0x00160006
326 #define ME_MODULE_TYPE_MULTISIG_RTD8_PT1000			0x00160007
327 #define ME_MODULE_TYPE_MULTISIG_TE8_TYPE_B			0x00160008
328 #define ME_MODULE_TYPE_MULTISIG_TE8_TYPE_E			0x00160009
329 #define ME_MODULE_TYPE_MULTISIG_TE8_TYPE_J			0x0016000A
330 #define ME_MODULE_TYPE_MULTISIG_TE8_TYPE_K			0x0016000B
331 #define ME_MODULE_TYPE_MULTISIG_TE8_TYPE_N			0x0016000C
332 #define ME_MODULE_TYPE_MULTISIG_TE8_TYPE_R			0x0016000D
333 #define ME_MODULE_TYPE_MULTISIG_TE8_TYPE_S			0x0016000E
334 #define ME_MODULE_TYPE_MULTISIG_TE8_TYPE_T			0x0016000F
335 #define ME_MODULE_TYPE_MULTISIG_TE8_TEMP_SENSOR		0x00160010
336 
337 /*==================================================================
338   Defines for meQuerySubdeviceCaps function
339   ================================================================*/
340 
341 #define ME_CAPS_NONE								0x00000000
342 
343 #define ME_CAPS_DIO_DIR_BIT							0x00000001
344 #define ME_CAPS_DIO_DIR_BYTE						0x00000002
345 #define ME_CAPS_DIO_DIR_WORD						0x00000004
346 #define ME_CAPS_DIO_DIR_DWORD						0x00000008
347 #define ME_CAPS_DIO_SINK_SOURCE						0x00000010
348 #define ME_CAPS_DIO_BIT_PATTERN_IRQ					0x00000020
349 #define ME_CAPS_DIO_BIT_MASK_IRQ_EDGE_RISING		0x00000040
350 #define ME_CAPS_DIO_BIT_MASK_IRQ_EDGE_FALLING		0x00000080
351 #define ME_CAPS_DIO_BIT_MASK_IRQ_EDGE_ANY			0x00000100
352 #define ME_CAPS_DIO_OVER_TEMP_IRQ					0x00000200
353 
354 #define ME_CAPS_CTR_CLK_PREVIOUS					0x00000001
355 #define ME_CAPS_CTR_CLK_INTERNAL_1MHZ				0x00000002
356 #define ME_CAPS_CTR_CLK_INTERNAL_10MHZ				0x00000004
357 #define ME_CAPS_CTR_CLK_EXTERNAL					0x00000008
358 
359 #define ME_CAPS_AI_TRIG_SYNCHRONOUS					0x00000001
360 /// @note Backward compatibility for me1600 in old style.
361 #define ME_CAPS_AI_TRIG_SIMULTANEOUS				ME_CAPS_AI_TRIG_SYNCHRONOUS
362 #define ME_CAPS_AI_FIFO								0x00000002
363 #define ME_CAPS_AI_FIFO_THRESHOLD					0x00000004
364 
365 #define ME_CAPS_AO_TRIG_SYNCHRONOUS					0x00000001
366 /// @note Backward compatibility for me1600 in old style.
367 #define ME_CAPS_AO_TRIG_SIMULTANEOUS				ME_CAPS_AO_TRIG_SYNCHRONOUS
368 #define ME_CAPS_AO_FIFO								0x00000002
369 #define ME_CAPS_AO_FIFO_THRESHOLD					0x00000004
370 
371 #define ME_CAPS_EXT_IRQ_EDGE_RISING					0x00000001
372 #define ME_CAPS_EXT_IRQ_EDGE_FALLING				0x00000002
373 #define ME_CAPS_EXT_IRQ_EDGE_ANY					0x00000004
374 
375 /*==================================================================
376   Defines for meQuerySubdeviceCapsArgs function
377   ================================================================*/
378 
379 #define ME_CAP_AI_FIFO_SIZE							0x001D0000
380 #define ME_CAP_AI_BUFFER_SIZE						0x001D0001
381 
382 #define ME_CAP_AO_FIFO_SIZE							0x001F0000
383 #define ME_CAP_AO_BUFFER_SIZE						0x001F0001
384 
385 #define ME_CAP_CTR_WIDTH							0x00200000
386 
387 /*==================================================================
388   Defines common to query functions
389   ================================================================*/
390 
391 #define ME_UNIT_INVALID								0x00000000
392 #define ME_UNIT_VOLT								0x00170001
393 #define ME_UNIT_AMPERE								0x00170002
394 #define ME_UNIT_ANY									0x00170003
395 
396 #define ME_TYPE_INVALID								0x00000000
397 #define ME_TYPE_AO									0x00180001
398 #define ME_TYPE_AI									0x00180002
399 #define ME_TYPE_DIO									0x00180003
400 #define ME_TYPE_DO									0x00180004
401 #define ME_TYPE_DI									0x00180005
402 #define ME_TYPE_CTR									0x00180006
403 #define ME_TYPE_EXT_IRQ								0x00180007
404 
405 #define ME_SUBTYPE_INVALID							0x00000000
406 #define ME_SUBTYPE_SINGLE							0x00190001
407 #define ME_SUBTYPE_STREAMING						0x00190002
408 #define ME_SUBTYPE_CTR_8254							0x00190003
409 #define ME_SUBTYPE_ANY								0x00190004
410 
411 #define ME_DEVICE_DRIVER_NAME_MAX_COUNT				64
412 #define ME_DEVICE_NAME_MAX_COUNT					64
413 
414 #define ME_DEVICE_DESCRIPTION_MAX_COUNT				256
415 
416 #define ME_BUS_TYPE_INVALID							0x00000000
417 #define ME_BUS_TYPE_PCI								0x001A0001
418 #define ME_BUS_TYPE_USB								0x001A0002
419 
420 #define ME_PLUGGED_INVALID							0x00000000
421 #define ME_PLUGGED_IN								0x001B0001
422 #define ME_PLUGGED_OUT								0x001B0002
423 
424 #define ME_EXTENSION_TYPE_INVALID					0x00000000
425 #define ME_EXTENSION_TYPE_NONE						0x001C0001
426 #define ME_EXTENSION_TYPE_MUX32M					0x001C0002
427 #define ME_EXTENSION_TYPE_DEMUX32					0x001C0003
428 #define ME_EXTENSION_TYPE_MUX32S					0x001C0004
429 
430 #define ME_ACCESS_TYPE_INVALID						0x00000000
431 #define ME_ACCESS_TYPE_LOCAL						0x001D0001
432 #define ME_ACCESS_TYPE_REMOTE						0x001D0002
433 
434 /// @note Add by KG
435 
436 /*==================================================================
437   Defines for meUtilityPWM
438   ================================================================*/
439 #define ME_PWM_START_CONNECT_INTERNAL				0x00200001
440 
441 /* Flags for SingleConfig channels configure */
442 #define ME_SINGLE_CHANNEL_NOT_CONFIGURED			0x00
443 #define ME_SINGLE_CHANNEL_CONFIGURED				0x01
444 
445 /* Define if configuration should be downloaded to driver */
446 #define ME_CONFIG_LOAD_NO_FLAGS						0x0
447 #define ME_CONFIG_LOAD_TO_DRIVER					0x1
448 
449 #endif
450