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