]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * This file is part of the libsigrok project. | |
3 | * | |
4 | * Copyright (C) 2012 Bert Vermeulen <bert@biot.com> | |
5 | * Copyright (C) 2012 Alexandru Gagniuc <mr.nuke.me@gmail.com> | |
6 | * Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de> | |
7 | * | |
8 | * This program is free software: you can redistribute it and/or modify | |
9 | * it under the terms of the GNU General Public License as published by | |
10 | * the Free Software Foundation, either version 3 of the License, or | |
11 | * (at your option) any later version. | |
12 | * | |
13 | * This program is distributed in the hope that it will be useful, | |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | * GNU General Public License for more details. | |
17 | * | |
18 | * You should have received a copy of the GNU General Public License | |
19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
20 | */ | |
21 | ||
22 | #include <sys/types.h> | |
23 | #include <sys/stat.h> | |
24 | #include <fcntl.h> | |
25 | #include <string.h> | |
26 | #include <errno.h> | |
27 | #include <glib.h> | |
28 | #include "libsigrok.h" | |
29 | #include "libsigrok-internal.h" | |
30 | #include "protocol.h" | |
31 | ||
32 | static const int32_t hwopts[] = { | |
33 | SR_CONF_CONN, | |
34 | SR_CONF_SERIALCOMM, | |
35 | }; | |
36 | ||
37 | static const int32_t hwcaps[] = { | |
38 | SR_CONF_MULTIMETER, | |
39 | SR_CONF_LIMIT_SAMPLES, | |
40 | SR_CONF_LIMIT_MSEC, | |
41 | SR_CONF_CONTINUOUS, | |
42 | }; | |
43 | ||
44 | SR_PRIV struct sr_dev_driver digitek_dt4000zc_driver_info; | |
45 | SR_PRIV struct sr_dev_driver tekpower_tp4000zc_driver_info; | |
46 | SR_PRIV struct sr_dev_driver metex_me31_driver_info; | |
47 | SR_PRIV struct sr_dev_driver peaktech_3410_driver_info; | |
48 | SR_PRIV struct sr_dev_driver mastech_mas345_driver_info; | |
49 | SR_PRIV struct sr_dev_driver va_va18b_driver_info; | |
50 | SR_PRIV struct sr_dev_driver metex_m3640d_driver_info; | |
51 | SR_PRIV struct sr_dev_driver peaktech_4370_driver_info; | |
52 | SR_PRIV struct sr_dev_driver pce_pce_dm32_driver_info; | |
53 | SR_PRIV struct sr_dev_driver radioshack_22_168_driver_info; | |
54 | SR_PRIV struct sr_dev_driver radioshack_22_805_driver_info; | |
55 | SR_PRIV struct sr_dev_driver radioshack_22_812_driver_info; | |
56 | SR_PRIV struct sr_dev_driver tecpel_dmm_8060_ser_driver_info; | |
57 | SR_PRIV struct sr_dev_driver tecpel_dmm_8061_ser_driver_info; | |
58 | SR_PRIV struct sr_dev_driver voltcraft_m3650d_driver_info; | |
59 | SR_PRIV struct sr_dev_driver voltcraft_vc820_ser_driver_info; | |
60 | SR_PRIV struct sr_dev_driver voltcraft_vc830_ser_driver_info; | |
61 | SR_PRIV struct sr_dev_driver voltcraft_vc840_ser_driver_info; | |
62 | SR_PRIV struct sr_dev_driver uni_t_ut61d_ser_driver_info; | |
63 | SR_PRIV struct sr_dev_driver uni_t_ut61e_ser_driver_info; | |
64 | ||
65 | SR_PRIV struct dmm_info dmms[] = { | |
66 | { | |
67 | "Digitek", "DT4000ZC", "2400/8n1", 2400, | |
68 | FS9721_PACKET_SIZE, NULL, | |
69 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
70 | sr_fs9721_10_temp_c, | |
71 | &digitek_dt4000zc_driver_info, receive_data_DIGITEK_DT4000ZC, | |
72 | }, | |
73 | { | |
74 | "TekPower", "TP4000ZC", "2400/8n1", 2400, | |
75 | FS9721_PACKET_SIZE, NULL, | |
76 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
77 | sr_fs9721_10_temp_c, | |
78 | &tekpower_tp4000zc_driver_info, receive_data_TEKPOWER_TP4000ZC, | |
79 | }, | |
80 | { | |
81 | "Metex", "ME-31", "600/7n2/rts=0/dtr=1", 600, | |
82 | METEX14_PACKET_SIZE, sr_metex14_packet_request, | |
83 | sr_metex14_packet_valid, sr_metex14_parse, | |
84 | NULL, | |
85 | &metex_me31_driver_info, receive_data_METEX_ME31, | |
86 | }, | |
87 | { | |
88 | "Peaktech", "3410", "600/7n2/rts=0/dtr=1", 600, | |
89 | METEX14_PACKET_SIZE, sr_metex14_packet_request, | |
90 | sr_metex14_packet_valid, sr_metex14_parse, | |
91 | NULL, | |
92 | &peaktech_3410_driver_info, receive_data_PEAKTECH_3410, | |
93 | }, | |
94 | { | |
95 | "MASTECH", "MAS345", "600/7n2/rts=0/dtr=1", 600, | |
96 | METEX14_PACKET_SIZE, sr_metex14_packet_request, | |
97 | sr_metex14_packet_valid, sr_metex14_parse, | |
98 | NULL, | |
99 | &mastech_mas345_driver_info, receive_data_MASTECH_MAS345, | |
100 | }, | |
101 | { | |
102 | "V&A", "VA18B", "2400/8n1", 2400, | |
103 | FS9721_PACKET_SIZE, NULL, | |
104 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
105 | sr_fs9721_01_temp_c, | |
106 | &va_va18b_driver_info, receive_data_VA_VA18B, | |
107 | }, | |
108 | { | |
109 | "Metex", "M-3640D", "1200/7n2/rts=0/dtr=1", 1200, | |
110 | METEX14_PACKET_SIZE, sr_metex14_packet_request, | |
111 | sr_metex14_packet_valid, sr_metex14_parse, | |
112 | NULL, | |
113 | &metex_m3640d_driver_info, receive_data_METEX_M3640D, | |
114 | }, | |
115 | { | |
116 | "PeakTech", "4370", "1200/7n2/rts=0/dtr=1", 1200, | |
117 | METEX14_PACKET_SIZE, sr_metex14_packet_request, | |
118 | sr_metex14_packet_valid, sr_metex14_parse, | |
119 | NULL, | |
120 | &peaktech_4370_driver_info, receive_data_PEAKTECH_4370, | |
121 | }, | |
122 | { | |
123 | "PCE", "PCE-DM32", "2400/8n1", 2400, | |
124 | FS9721_PACKET_SIZE, NULL, | |
125 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
126 | sr_fs9721_01_10_temp_f_c, | |
127 | &pce_pce_dm32_driver_info, receive_data_PCE_PCE_DM32, | |
128 | }, | |
129 | { | |
130 | "RadioShack", "22-168", "1200/7n2/rts=0/dtr=1", 1200, | |
131 | METEX14_PACKET_SIZE, sr_metex14_packet_request, | |
132 | sr_metex14_packet_valid, sr_metex14_parse, | |
133 | NULL, | |
134 | &radioshack_22_168_driver_info, receive_data_RADIOSHACK_22_168, | |
135 | }, | |
136 | { | |
137 | "RadioShack", "22-805", "600/7n2/rts=0/dtr=1", 600, | |
138 | METEX14_PACKET_SIZE, sr_metex14_packet_request, | |
139 | sr_metex14_packet_valid, sr_metex14_parse, | |
140 | NULL, | |
141 | &radioshack_22_805_driver_info, receive_data_RADIOSHACK_22_805, | |
142 | }, | |
143 | { | |
144 | "RadioShack", "22-812", "4800/8n1/rts=0/dtr=1", 4800, | |
145 | RS9LCD_PACKET_SIZE, NULL, | |
146 | sr_rs9lcd_packet_valid, sr_rs9lcd_parse, | |
147 | NULL, | |
148 | &radioshack_22_812_driver_info, receive_data_RADIOSHACK_22_812, | |
149 | }, | |
150 | { | |
151 | "Tecpel", "DMM-8060 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
152 | 2400, FS9721_PACKET_SIZE, NULL, | |
153 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
154 | NULL, | |
155 | &tecpel_dmm_8060_ser_driver_info, | |
156 | receive_data_TECPEL_DMM_8060_SER, | |
157 | }, | |
158 | { | |
159 | "Tecpel", "DMM-8061 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
160 | 2400, FS9721_PACKET_SIZE, NULL, | |
161 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
162 | sr_fs9721_00_temp_c, | |
163 | &tecpel_dmm_8061_ser_driver_info, | |
164 | receive_data_TECPEL_DMM_8061_SER, | |
165 | }, | |
166 | { | |
167 | "Voltcraft", "M-3650D", "1200/7n2/rts=0/dtr=1", 1200, | |
168 | METEX14_PACKET_SIZE, sr_metex14_packet_request, | |
169 | sr_metex14_packet_valid, sr_metex14_parse, | |
170 | NULL, | |
171 | &voltcraft_m3650d_driver_info, receive_data_VOLTCRAFT_M3650D, | |
172 | }, | |
173 | { | |
174 | "Voltcraft", "VC-820 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
175 | 2400, FS9721_PACKET_SIZE, NULL, | |
176 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
177 | NULL, | |
178 | &voltcraft_vc820_ser_driver_info, | |
179 | receive_data_VOLTCRAFT_VC820_SER, | |
180 | }, | |
181 | { | |
182 | "Voltcraft", "VC-830 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
183 | 2400, FS9922_PACKET_SIZE, NULL, | |
184 | sr_fs9922_packet_valid, sr_fs9922_parse, | |
185 | NULL, | |
186 | &voltcraft_vc830_ser_driver_info, | |
187 | receive_data_VOLTCRAFT_VC830_SER, | |
188 | }, | |
189 | { | |
190 | "Voltcraft", "VC-840 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
191 | 2400, FS9721_PACKET_SIZE, NULL, | |
192 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
193 | sr_fs9721_00_temp_c, | |
194 | &voltcraft_vc840_ser_driver_info, | |
195 | receive_data_VOLTCRAFT_VC840_SER, | |
196 | }, | |
197 | { | |
198 | "UNI-T", "UT61D (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
199 | 2400, FS9922_PACKET_SIZE, NULL, | |
200 | sr_fs9922_packet_valid, sr_fs9922_parse, NULL, | |
201 | &uni_t_ut61d_ser_driver_info, receive_data_UNI_T_UT61D_SER, | |
202 | }, | |
203 | { | |
204 | /* Note: ES51922 baudrate is actually 19230! */ | |
205 | "UNI-T", "UT61E (UT-D02 cable)", "19200/7o1/rts=0/dtr=1", | |
206 | 19200, ES51922_PACKET_SIZE, NULL, | |
207 | sr_es51922_packet_valid, sr_es51922_parse, NULL, | |
208 | &uni_t_ut61e_ser_driver_info, receive_data_UNI_T_UT61E_SER, | |
209 | }, | |
210 | }; | |
211 | ||
212 | static int dev_clear(int dmm) | |
213 | { | |
214 | return std_dev_clear(dmms[dmm].di, NULL); | |
215 | } | |
216 | ||
217 | static int init(struct sr_context *sr_ctx, int dmm) | |
218 | { | |
219 | sr_dbg("Selected '%s' subdriver.", dmms[dmm].di->name); | |
220 | ||
221 | return std_init(sr_ctx, dmms[dmm].di, LOG_PREFIX); | |
222 | } | |
223 | ||
224 | static GSList *sdmm_scan(const char *conn, const char *serialcomm, int dmm) | |
225 | { | |
226 | struct sr_dev_inst *sdi; | |
227 | struct drv_context *drvc; | |
228 | struct dev_context *devc; | |
229 | struct sr_probe *probe; | |
230 | struct sr_serial_dev_inst *serial; | |
231 | GSList *devices; | |
232 | int dropped, ret; | |
233 | size_t len; | |
234 | uint8_t buf[128]; | |
235 | ||
236 | if (!(serial = sr_serial_dev_inst_new(conn, serialcomm))) | |
237 | return NULL; | |
238 | ||
239 | if (serial_open(serial, SERIAL_RDWR | SERIAL_NONBLOCK) != SR_OK) | |
240 | return NULL; | |
241 | ||
242 | sr_info("Probing serial port %s.", conn); | |
243 | ||
244 | drvc = dmms[dmm].di->priv; | |
245 | devices = NULL; | |
246 | serial_flush(serial); | |
247 | ||
248 | /* Request a packet if the DMM requires this. */ | |
249 | if (dmms[dmm].packet_request) { | |
250 | if ((ret = dmms[dmm].packet_request(serial)) < 0) { | |
251 | sr_err("Failed to request packet: %d.", ret); | |
252 | return FALSE; | |
253 | } | |
254 | } | |
255 | ||
256 | /* | |
257 | * There's no way to get an ID from the multimeter. It just sends data | |
258 | * periodically (or upon request), so the best we can do is check if | |
259 | * the packets match the expected format. | |
260 | */ | |
261 | ||
262 | /* Let's get a bit of data and see if we can find a packet. */ | |
263 | len = sizeof(buf); | |
264 | ret = serial_stream_detect(serial, buf, &len, dmms[dmm].packet_size, | |
265 | dmms[dmm].packet_valid, 1000, | |
266 | dmms[dmm].baudrate); | |
267 | if (ret != SR_OK) | |
268 | goto scan_cleanup; | |
269 | ||
270 | /* | |
271 | * If we dropped more than two packets worth of data, something is | |
272 | * wrong. We shouldn't quit however, since the dropped bytes might be | |
273 | * just zeroes at the beginning of the stream. Those can occur as a | |
274 | * combination of the nonstandard cable that ships with some devices | |
275 | * and the serial port or USB to serial adapter. | |
276 | */ | |
277 | dropped = len - dmms[dmm].packet_size; | |
278 | if (dropped > 2 * dmms[dmm].packet_size) | |
279 | sr_warn("Had to drop too much data."); | |
280 | ||
281 | sr_info("Found device on port %s.", conn); | |
282 | ||
283 | if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, dmms[dmm].vendor, | |
284 | dmms[dmm].device, ""))) | |
285 | goto scan_cleanup; | |
286 | ||
287 | if (!(devc = g_try_malloc0(sizeof(struct dev_context)))) { | |
288 | sr_err("Device context malloc failed."); | |
289 | goto scan_cleanup; | |
290 | } | |
291 | ||
292 | sdi->inst_type = SR_INST_SERIAL; | |
293 | sdi->conn = serial; | |
294 | ||
295 | sdi->priv = devc; | |
296 | sdi->driver = dmms[dmm].di; | |
297 | if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1"))) | |
298 | goto scan_cleanup; | |
299 | sdi->probes = g_slist_append(sdi->probes, probe); | |
300 | drvc->instances = g_slist_append(drvc->instances, sdi); | |
301 | devices = g_slist_append(devices, sdi); | |
302 | ||
303 | scan_cleanup: | |
304 | serial_close(serial); | |
305 | ||
306 | return devices; | |
307 | } | |
308 | ||
309 | static GSList *scan(GSList *options, int dmm) | |
310 | { | |
311 | struct sr_config *src; | |
312 | GSList *l, *devices; | |
313 | const char *conn, *serialcomm; | |
314 | ||
315 | conn = serialcomm = NULL; | |
316 | for (l = options; l; l = l->next) { | |
317 | src = l->data; | |
318 | switch (src->key) { | |
319 | case SR_CONF_CONN: | |
320 | conn = g_variant_get_string(src->data, NULL); | |
321 | break; | |
322 | case SR_CONF_SERIALCOMM: | |
323 | serialcomm = g_variant_get_string(src->data, NULL); | |
324 | break; | |
325 | } | |
326 | } | |
327 | if (!conn) | |
328 | return NULL; | |
329 | ||
330 | if (serialcomm) { | |
331 | /* Use the provided comm specs. */ | |
332 | devices = sdmm_scan(conn, serialcomm, dmm); | |
333 | } else { | |
334 | /* Try the default. */ | |
335 | devices = sdmm_scan(conn, dmms[dmm].conn, dmm); | |
336 | } | |
337 | ||
338 | return devices; | |
339 | } | |
340 | ||
341 | static GSList *dev_list(int dmm) | |
342 | { | |
343 | return ((struct drv_context *)(dmms[dmm].di->priv))->instances; | |
344 | } | |
345 | ||
346 | static int dev_open(struct sr_dev_inst *sdi) | |
347 | { | |
348 | struct sr_serial_dev_inst *serial; | |
349 | ||
350 | serial = sdi->conn; | |
351 | if (serial_open(serial, SERIAL_RDWR | SERIAL_NONBLOCK) != SR_OK) | |
352 | return SR_ERR; | |
353 | ||
354 | sdi->status = SR_ST_ACTIVE; | |
355 | ||
356 | return SR_OK; | |
357 | } | |
358 | ||
359 | static int dev_close(struct sr_dev_inst *sdi) | |
360 | { | |
361 | struct sr_serial_dev_inst *serial; | |
362 | ||
363 | serial = sdi->conn; | |
364 | if (serial && serial->fd != -1) { | |
365 | serial_close(serial); | |
366 | sdi->status = SR_ST_INACTIVE; | |
367 | } | |
368 | ||
369 | return SR_OK; | |
370 | } | |
371 | ||
372 | static int cleanup(int dmm) | |
373 | { | |
374 | return dev_clear(dmm); | |
375 | } | |
376 | ||
377 | static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi) | |
378 | { | |
379 | struct dev_context *devc; | |
380 | ||
381 | if (sdi->status != SR_ST_ACTIVE) | |
382 | return SR_ERR_DEV_CLOSED; | |
383 | ||
384 | if (!(devc = sdi->priv)) { | |
385 | sr_err("sdi->priv was NULL."); | |
386 | return SR_ERR_BUG; | |
387 | } | |
388 | ||
389 | switch (id) { | |
390 | case SR_CONF_LIMIT_SAMPLES: | |
391 | devc->limit_samples = g_variant_get_uint64(data); | |
392 | sr_dbg("Setting sample limit to %" PRIu64 ".", | |
393 | devc->limit_samples); | |
394 | break; | |
395 | case SR_CONF_LIMIT_MSEC: | |
396 | devc->limit_msec = g_variant_get_uint64(data); | |
397 | sr_dbg("Setting time limit to %" PRIu64 "ms.", | |
398 | devc->limit_msec); | |
399 | break; | |
400 | default: | |
401 | return SR_ERR_NA; | |
402 | } | |
403 | ||
404 | return SR_OK; | |
405 | } | |
406 | ||
407 | static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi) | |
408 | { | |
409 | ||
410 | (void)sdi; | |
411 | ||
412 | switch (key) { | |
413 | case SR_CONF_SCAN_OPTIONS: | |
414 | *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32, | |
415 | hwopts, ARRAY_SIZE(hwopts), sizeof(int32_t)); | |
416 | break; | |
417 | case SR_CONF_DEVICE_OPTIONS: | |
418 | *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32, | |
419 | hwcaps, ARRAY_SIZE(hwcaps), sizeof(int32_t)); | |
420 | break; | |
421 | default: | |
422 | return SR_ERR_NA; | |
423 | } | |
424 | ||
425 | return SR_OK; | |
426 | } | |
427 | ||
428 | static int dev_acquisition_start(const struct sr_dev_inst *sdi, | |
429 | void *cb_data, int dmm) | |
430 | { | |
431 | struct dev_context *devc; | |
432 | struct sr_serial_dev_inst *serial; | |
433 | ||
434 | if (sdi->status != SR_ST_ACTIVE) | |
435 | return SR_ERR_DEV_CLOSED; | |
436 | ||
437 | if (!(devc = sdi->priv)) { | |
438 | sr_err("sdi->priv was NULL."); | |
439 | return SR_ERR_BUG; | |
440 | } | |
441 | ||
442 | devc->cb_data = cb_data; | |
443 | ||
444 | /* | |
445 | * Reset the number of samples to take. If we've already collected our | |
446 | * quota, but we start a new session, and don't reset this, we'll just | |
447 | * quit without acquiring any new samples. | |
448 | */ | |
449 | devc->num_samples = 0; | |
450 | devc->starttime = g_get_monotonic_time(); | |
451 | ||
452 | /* Send header packet to the session bus. */ | |
453 | std_session_send_df_header(cb_data, LOG_PREFIX); | |
454 | ||
455 | /* Poll every 50ms, or whenever some data comes in. */ | |
456 | serial = sdi->conn; | |
457 | sr_source_add(serial->fd, G_IO_IN, 50, | |
458 | dmms[dmm].receive_data, (void *)sdi); | |
459 | ||
460 | return SR_OK; | |
461 | } | |
462 | ||
463 | static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data) | |
464 | { | |
465 | return std_dev_acquisition_stop_serial(sdi, cb_data, dev_close, | |
466 | sdi->conn, LOG_PREFIX); | |
467 | } | |
468 | ||
469 | /* Driver-specific API function wrappers */ | |
470 | #define HW_INIT(X) \ | |
471 | static int init_##X(struct sr_context *sr_ctx) { return init(sr_ctx, X); } | |
472 | #define HW_CLEANUP(X) \ | |
473 | static int cleanup_##X(void) { return cleanup(X); } | |
474 | #define HW_SCAN(X) \ | |
475 | static GSList *scan_##X(GSList *options) { return scan(options, X); } | |
476 | #define HW_DEV_LIST(X) \ | |
477 | static GSList *dev_list_##X(void) { return dev_list(X); } | |
478 | #define HW_DEV_CLEAR(X) \ | |
479 | static int dev_clear_##X(void) { return dev_clear(X); } | |
480 | #define HW_DEV_ACQUISITION_START(X) \ | |
481 | static int dev_acquisition_start_##X(const struct sr_dev_inst *sdi, \ | |
482 | void *cb_data) { return dev_acquisition_start(sdi, cb_data, X); } | |
483 | ||
484 | /* Driver structs and API function wrappers */ | |
485 | #define DRV(ID, ID_UPPER, NAME, LONGNAME) \ | |
486 | HW_INIT(ID_UPPER) \ | |
487 | HW_CLEANUP(ID_UPPER) \ | |
488 | HW_SCAN(ID_UPPER) \ | |
489 | HW_DEV_LIST(ID_UPPER) \ | |
490 | HW_DEV_CLEAR(ID_UPPER) \ | |
491 | HW_DEV_ACQUISITION_START(ID_UPPER) \ | |
492 | SR_PRIV struct sr_dev_driver ID##_driver_info = { \ | |
493 | .name = NAME, \ | |
494 | .longname = LONGNAME, \ | |
495 | .api_version = 1, \ | |
496 | .init = init_##ID_UPPER, \ | |
497 | .cleanup = cleanup_##ID_UPPER, \ | |
498 | .scan = scan_##ID_UPPER, \ | |
499 | .dev_list = dev_list_##ID_UPPER, \ | |
500 | .dev_clear = dev_clear_##ID_UPPER, \ | |
501 | .config_get = NULL, \ | |
502 | .config_set = config_set, \ | |
503 | .config_list = config_list, \ | |
504 | .dev_open = dev_open, \ | |
505 | .dev_close = dev_close, \ | |
506 | .dev_acquisition_start = dev_acquisition_start_##ID_UPPER, \ | |
507 | .dev_acquisition_stop = dev_acquisition_stop, \ | |
508 | .priv = NULL, \ | |
509 | }; | |
510 | ||
511 | DRV(digitek_dt4000zc, DIGITEK_DT4000ZC, "digitek-dt4000zc", "Digitek DT4000ZC") | |
512 | DRV(tekpower_tp4000zc, TEKPOWER_TP4000ZC, "tekpower-tp4000zc", "TekPower TP4000ZC") | |
513 | DRV(metex_me31, METEX_ME31, "metex-me31", "Metex ME-31") | |
514 | DRV(peaktech_3410, PEAKTECH_3410, "peaktech-3410", "PeakTech 3410") | |
515 | DRV(mastech_mas345, MASTECH_MAS345, "mastech-mas345", "MASTECH MAS345") | |
516 | DRV(va_va18b, VA_VA18B, "va-va18b", "V&A VA18B") | |
517 | DRV(metex_m3640d, METEX_M3640D, "metex-m3640d", "Metex M-3640D") | |
518 | DRV(peaktech_4370, PEAKTECH_4370, "peaktech-4370", "PeakTech 4370") | |
519 | DRV(pce_pce_dm32, PCE_PCE_DM32, "pce-pce-dm32", "PCE PCE-DM32") | |
520 | DRV(radioshack_22_168, RADIOSHACK_22_168, "radioshack-22-168", "RadioShack 22-168") | |
521 | DRV(radioshack_22_805, RADIOSHACK_22_805, "radioshack-22-805", "RadioShack 22-805") | |
522 | DRV(radioshack_22_812, RADIOSHACK_22_812, "radioshack-22-812", "RadioShack 22-812") | |
523 | DRV(tecpel_dmm_8060_ser, TECPEL_DMM_8060_SER, "tecpel-dmm-8060-ser", "Tecpel DMM-8060 (UT-D02 cable)") | |
524 | DRV(tecpel_dmm_8061_ser, TECPEL_DMM_8061_SER, "tecpel-dmm-8061-ser", "Tecpel DMM-8061 (UT-D02 cable)") | |
525 | DRV(voltcraft_m3650d, VOLTCRAFT_M3650D, "voltcraft-m3650d", "Voltcraft M-3650D") | |
526 | DRV(voltcraft_vc820_ser, VOLTCRAFT_VC820_SER, "voltcraft-vc820-ser", "Voltcraft VC-820 (UT-D02 cable)") | |
527 | DRV(voltcraft_vc830_ser, VOLTCRAFT_VC830_SER, "voltcraft-vc830-ser", "Voltcraft VC-830 (UT-D02 cable)") | |
528 | DRV(voltcraft_vc840_ser, VOLTCRAFT_VC840_SER, "voltcraft-vc840-ser", "Voltcraft VC-840 (UT-D02 cable)") | |
529 | DRV(uni_t_ut61d_ser, UNI_T_UT61D_SER, "uni-t-ut61d-ser", "UNI-T UT61D (UT-D02 cable)") | |
530 | DRV(uni_t_ut61e_ser, UNI_T_UT61E_SER, "uni-t-ut61e-ser", "UNI-T UT61E (UT-D02 cable)") |