]>
Commit | Line | Data |
---|---|---|
7dc55d93 AG |
1 | /* |
2 | * This file is part of the sigrok project. | |
3 | * | |
4 | * Copyright (C) 2012 Bert Vermeulen <bert@biot.com> | |
5 | * Copyright (C) 2012 Alexandru Gagniuc <mr.nuke.me@gmail.com> | |
729b01f9 | 6 | * Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de> |
7dc55d93 AG |
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 <glib.h> | |
7dc55d93 AG |
23 | #include <sys/types.h> |
24 | #include <sys/stat.h> | |
25 | #include <fcntl.h> | |
26 | #include <string.h> | |
27 | #include <errno.h> | |
bbabddbd UH |
28 | #include "libsigrok.h" |
29 | #include "libsigrok-internal.h" | |
30 | #include "protocol.h" | |
7dc55d93 AG |
31 | |
32 | static const int hwopts[] = { | |
33 | SR_HWOPT_CONN, | |
34 | SR_HWOPT_SERIALCOMM, | |
35 | 0, | |
36 | }; | |
37 | ||
38 | static const int hwcaps[] = { | |
39 | SR_HWCAP_MULTIMETER, | |
40 | SR_HWCAP_LIMIT_SAMPLES, | |
41 | SR_HWCAP_CONTINUOUS, | |
42 | 0, | |
43 | }; | |
44 | ||
45 | static const char *probe_names[] = { | |
46 | "Probe", | |
47 | NULL, | |
48 | }; | |
49 | ||
f086b830 | 50 | SR_PRIV struct sr_dev_driver digitek_dt4000zc_driver_info; |
729b01f9 | 51 | SR_PRIV struct sr_dev_driver tekpower_tp4000zc_driver_info; |
ce3777ad | 52 | SR_PRIV struct sr_dev_driver metex_me31_driver_info; |
f0ac4929 | 53 | SR_PRIV struct sr_dev_driver peaktech_3410_driver_info; |
5887c9cc | 54 | SR_PRIV struct sr_dev_driver mastech_mas345_driver_info; |
6dca2f16 | 55 | SR_PRIV struct sr_dev_driver va_va18b_driver_info; |
f086b830 | 56 | |
ce3777ad UH |
57 | static struct sr_dev_driver *di_dt4000zc = &digitek_dt4000zc_driver_info; |
58 | static struct sr_dev_driver *di_tp4000zc = &tekpower_tp4000zc_driver_info; | |
59 | static struct sr_dev_driver *di_me31 = &metex_me31_driver_info; | |
f0ac4929 | 60 | static struct sr_dev_driver *di_3410 = &peaktech_3410_driver_info; |
5887c9cc | 61 | static struct sr_dev_driver *di_mas345 = &mastech_mas345_driver_info; |
6dca2f16 | 62 | static struct sr_dev_driver *di_va18b = &va_va18b_driver_info; |
729b01f9 UH |
63 | |
64 | /* After hw_init() this will point to a device-specific entry (see above). */ | |
65 | static struct sr_dev_driver *di = NULL; | |
66 | ||
67 | SR_PRIV struct dmm_info dmms[] = { | |
f086b830 | 68 | { |
ce3777ad UH |
69 | "Digitek", "DT4000ZC", "2400/8n1", 2400, |
70 | FS9721_PACKET_SIZE, NULL, | |
71 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
f086b830 UH |
72 | dmm_details_dt4000zc, |
73 | }, | |
729b01f9 | 74 | { |
ce3777ad UH |
75 | "TekPower", "TP4000ZC", "2400/8n1", 2400, |
76 | FS9721_PACKET_SIZE, NULL, | |
77 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
729b01f9 UH |
78 | dmm_details_tp4000zc, |
79 | }, | |
ce3777ad UH |
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 | }, | |
f0ac4929 UH |
86 | { |
87 | "Peaktech", "3410", "600/7n2/rts=0/dtr=1", 600, | |
88 | METEX14_PACKET_SIZE, sr_metex14_packet_request, | |
89 | sr_metex14_packet_valid, sr_metex14_parse, | |
90 | NULL, | |
91 | }, | |
5887c9cc UH |
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 | }, | |
6dca2f16 UH |
98 | { |
99 | "V&A", "VA18B", "2400/8n1", 2400, | |
100 | FS9721_PACKET_SIZE, NULL, | |
101 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
102 | dmm_details_va18b, | |
103 | }, | |
729b01f9 | 104 | }; |
7dc55d93 AG |
105 | |
106 | /* Properly close and free all devices. */ | |
107 | static int clear_instances(void) | |
108 | { | |
109 | struct sr_dev_inst *sdi; | |
110 | struct drv_context *drvc; | |
111 | struct dev_context *devc; | |
112 | GSList *l; | |
113 | ||
114 | if (!(drvc = di->priv)) | |
115 | return SR_OK; | |
116 | ||
117 | drvc = di->priv; | |
118 | for (l = drvc->instances; l; l = l->next) { | |
119 | if (!(sdi = l->data)) | |
120 | continue; | |
121 | if (!(devc = sdi->priv)) | |
122 | continue; | |
123 | sr_serial_dev_inst_free(devc->serial); | |
124 | sr_dev_inst_free(sdi); | |
125 | } | |
126 | g_slist_free(drvc->instances); | |
127 | drvc->instances = NULL; | |
128 | ||
129 | return SR_OK; | |
130 | } | |
131 | ||
729b01f9 | 132 | static int hw_init(int dmm) |
7dc55d93 AG |
133 | { |
134 | struct drv_context *drvc; | |
135 | ||
136 | if (!(drvc = g_try_malloc0(sizeof(struct drv_context)))) { | |
bbabddbd UH |
137 | sr_err("Driver context malloc failed."); |
138 | return SR_ERR_MALLOC; | |
7dc55d93 AG |
139 | } |
140 | ||
f086b830 | 141 | if (dmm == DIGITEK_DT4000ZC) |
ce3777ad | 142 | di = di_dt4000zc; |
729b01f9 | 143 | if (dmm == TEKPOWER_TP4000ZC) |
ce3777ad UH |
144 | di = di_tp4000zc; |
145 | if (dmm == METEX_ME31) | |
146 | di = di_me31; | |
f0ac4929 UH |
147 | if (dmm == PEAKTECH_3410) |
148 | di = di_3410; | |
5887c9cc UH |
149 | if (dmm == MASTECH_MAS345) |
150 | di = di_mas345; | |
6dca2f16 UH |
151 | if (dmm == VA_VA18B) |
152 | di = di_va18b; | |
729b01f9 UH |
153 | sr_dbg("Selected '%s' subdriver.", di->name); |
154 | ||
7dc55d93 AG |
155 | di->priv = drvc; |
156 | ||
157 | return SR_OK; | |
158 | } | |
159 | ||
f086b830 UH |
160 | static int hw_init_digitek_dt4000zc(void) |
161 | { | |
162 | return hw_init(DIGITEK_DT4000ZC); | |
163 | } | |
164 | ||
729b01f9 UH |
165 | static int hw_init_tekpower_tp4000zc(void) |
166 | { | |
167 | return hw_init(TEKPOWER_TP4000ZC); | |
168 | } | |
169 | ||
ce3777ad UH |
170 | static int hw_init_metex_me31(void) |
171 | { | |
172 | return hw_init(METEX_ME31); | |
173 | } | |
174 | ||
f0ac4929 UH |
175 | static int hw_init_peaktech_3410(void) |
176 | { | |
177 | return hw_init(PEAKTECH_3410); | |
178 | } | |
179 | ||
5887c9cc UH |
180 | static int hw_init_mastech_mas345(void) |
181 | { | |
182 | return hw_init(MASTECH_MAS345); | |
183 | } | |
184 | ||
6dca2f16 UH |
185 | static int hw_init_va_va18b(void) |
186 | { | |
187 | return hw_init(VA_VA18B); | |
188 | } | |
189 | ||
729b01f9 | 190 | static GSList *scan(const char *conn, const char *serialcomm, int dmm) |
7dc55d93 AG |
191 | { |
192 | struct sr_dev_inst *sdi; | |
193 | struct drv_context *drvc; | |
194 | struct dev_context *devc; | |
195 | struct sr_probe *probe; | |
d35afa87 | 196 | struct sr_serial_dev_inst *serial; |
7dc55d93 | 197 | GSList *devices; |
2546b05c AG |
198 | int dropped, ret; |
199 | size_t len; | |
200 | uint8_t buf[128]; | |
7dc55d93 | 201 | |
d35afa87 | 202 | if (!(serial = sr_serial_dev_inst_new(conn, serialcomm))) |
7dc55d93 | 203 | return NULL; |
d35afa87 | 204 | |
ce3777ad | 205 | if (serial_open(serial, SERIAL_RDWR | SERIAL_NONBLOCK) != SR_OK) |
7dc55d93 | 206 | return NULL; |
7dc55d93 | 207 | |
ce3777ad | 208 | sr_info("Probing port %s.", conn); |
7dc55d93 AG |
209 | |
210 | drvc = di->priv; | |
7dc55d93 | 211 | devices = NULL; |
d35afa87 | 212 | serial_flush(serial); |
bbabddbd UH |
213 | |
214 | /* | |
215 | * There's no way to get an ID from the multimeter. It just sends data | |
216 | * periodically, so the best we can do is check if the packets match | |
217 | * the expected format. | |
218 | */ | |
7dc55d93 | 219 | |
2546b05c AG |
220 | /* Let's get a bit of data and see if we can find a packet. */ |
221 | len = sizeof(buf); | |
7dc55d93 | 222 | |
ce3777ad UH |
223 | /* Request a packet if the DMM requires this. */ |
224 | if (dmms[dmm].packet_request) { | |
225 | if ((ret = dmms[dmm].packet_request(serial)) < 0) { | |
226 | sr_err("Failed to request packet: %d.", ret); | |
227 | return FALSE; | |
228 | } | |
229 | } | |
230 | ||
729b01f9 UH |
231 | ret = serial_stream_detect(serial, buf, &len, dmms[dmm].packet_size, |
232 | dmms[dmm].packet_valid, 1000, | |
233 | dmms[dmm].baudrate); | |
2546b05c AG |
234 | if (ret != SR_OK) |
235 | goto scan_cleanup; | |
7dc55d93 | 236 | |
2546b05c AG |
237 | /* |
238 | * If we dropped more than two packets worth of data, something is | |
239 | * wrong. We shouldn't quit however, since the dropped bytes might be | |
240 | * just zeroes at the beginning of the stream. Those can occur as a | |
241 | * combination of the nonstandard cable that ships with this device and | |
242 | * the serial port or USB to serial adapter. | |
243 | */ | |
729b01f9 UH |
244 | dropped = len - dmms[dmm].packet_size; |
245 | if (dropped > 2 * dmms[dmm].packet_size) | |
6bef68a7 | 246 | sr_warn("Had to drop too much data."); |
7dc55d93 | 247 | |
2546b05c | 248 | sr_info("Found device on port %s.", conn); |
7dc55d93 | 249 | |
729b01f9 UH |
250 | if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, dmms[dmm].vendor, |
251 | dmms[dmm].device, ""))) | |
2546b05c | 252 | goto scan_cleanup; |
6bef68a7 | 253 | |
2546b05c AG |
254 | if (!(devc = g_try_malloc0(sizeof(struct dev_context)))) { |
255 | sr_err("Device context malloc failed."); | |
256 | goto scan_cleanup; | |
7dc55d93 AG |
257 | } |
258 | ||
2546b05c AG |
259 | devc->serial = serial; |
260 | ||
261 | sdi->priv = devc; | |
262 | sdi->driver = di; | |
263 | if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P1"))) | |
264 | goto scan_cleanup; | |
265 | sdi->probes = g_slist_append(sdi->probes, probe); | |
266 | drvc->instances = g_slist_append(drvc->instances, sdi); | |
267 | devices = g_slist_append(devices, sdi); | |
268 | ||
269 | scan_cleanup: | |
d35afa87 | 270 | serial_close(serial); |
2546b05c | 271 | |
7dc55d93 AG |
272 | return devices; |
273 | } | |
274 | ||
275 | static GSList *hw_scan(GSList *options) | |
276 | { | |
277 | struct sr_hwopt *opt; | |
278 | GSList *l, *devices; | |
279 | const char *conn, *serialcomm; | |
729b01f9 | 280 | int dmm; |
7dc55d93 AG |
281 | |
282 | conn = serialcomm = NULL; | |
283 | for (l = options; l; l = l->next) { | |
284 | opt = l->data; | |
285 | switch (opt->hwopt) { | |
286 | case SR_HWOPT_CONN: | |
287 | conn = opt->value; | |
288 | break; | |
289 | case SR_HWOPT_SERIALCOMM: | |
290 | serialcomm = opt->value; | |
291 | break; | |
292 | } | |
293 | } | |
294 | if (!conn) | |
295 | return NULL; | |
296 | ||
f086b830 | 297 | if (!strcmp(di->name, "digitek-dt4000zc")) |
729b01f9 | 298 | dmm = 0; |
f086b830 UH |
299 | if (!strcmp(di->name, "tekpower-tp4000zc")) |
300 | dmm = 1; | |
ce3777ad UH |
301 | if (!strcmp(di->name, "metex-me31")) |
302 | dmm = 2; | |
f0ac4929 UH |
303 | if (!strcmp(di->name, "peaktech-3410")) |
304 | dmm = 3; | |
5887c9cc UH |
305 | if (!strcmp(di->name, "mastech-mas345")) |
306 | dmm = 4; | |
6dca2f16 UH |
307 | if (!strcmp(di->name, "va-va18b")) |
308 | dmm = 5; | |
729b01f9 | 309 | |
7dc55d93 AG |
310 | if (serialcomm) { |
311 | /* Use the provided comm specs. */ | |
729b01f9 | 312 | devices = scan(conn, serialcomm, dmm); |
7dc55d93 | 313 | } else { |
d35afa87 | 314 | /* Try the default. */ |
729b01f9 | 315 | devices = scan(conn, dmms[dmm].conn, dmm); |
7dc55d93 AG |
316 | } |
317 | ||
318 | return devices; | |
319 | } | |
320 | ||
321 | static GSList *hw_dev_list(void) | |
322 | { | |
323 | struct drv_context *drvc; | |
324 | ||
325 | drvc = di->priv; | |
326 | ||
327 | return drvc->instances; | |
328 | } | |
329 | ||
330 | static int hw_dev_open(struct sr_dev_inst *sdi) | |
331 | { | |
332 | struct dev_context *devc; | |
333 | ||
334 | if (!(devc = sdi->priv)) { | |
335 | sr_err("sdi->priv was NULL."); | |
336 | return SR_ERR_BUG; | |
337 | } | |
338 | ||
ce3777ad | 339 | if (serial_open(devc->serial, SERIAL_RDWR | SERIAL_NONBLOCK) != SR_OK) |
7dc55d93 | 340 | return SR_ERR; |
bbabddbd | 341 | |
7dc55d93 AG |
342 | sdi->status = SR_ST_ACTIVE; |
343 | ||
344 | return SR_OK; | |
345 | } | |
346 | ||
347 | static int hw_dev_close(struct sr_dev_inst *sdi) | |
348 | { | |
349 | struct dev_context *devc; | |
350 | ||
351 | if (!(devc = sdi->priv)) { | |
352 | sr_err("sdi->priv was NULL."); | |
353 | return SR_ERR_BUG; | |
354 | } | |
355 | ||
356 | if (devc->serial && devc->serial->fd != -1) { | |
d35afa87 | 357 | serial_close(devc->serial); |
7dc55d93 AG |
358 | sdi->status = SR_ST_INACTIVE; |
359 | } | |
360 | ||
361 | return SR_OK; | |
362 | } | |
363 | ||
364 | static int hw_cleanup(void) | |
365 | { | |
366 | clear_instances(); | |
367 | ||
368 | return SR_OK; | |
369 | } | |
370 | ||
371 | static int hw_info_get(int info_id, const void **data, | |
bbabddbd | 372 | const struct sr_dev_inst *sdi) |
7dc55d93 | 373 | { |
bbabddbd | 374 | (void)sdi; |
7dc55d93 AG |
375 | |
376 | switch (info_id) { | |
377 | case SR_DI_HWOPTS: | |
378 | *data = hwopts; | |
379 | break; | |
380 | case SR_DI_HWCAPS: | |
381 | *data = hwcaps; | |
382 | break; | |
383 | case SR_DI_NUM_PROBES: | |
384 | *data = GINT_TO_POINTER(1); | |
385 | break; | |
386 | case SR_DI_PROBE_NAMES: | |
387 | *data = probe_names; | |
388 | break; | |
389 | default: | |
390 | return SR_ERR_ARG; | |
391 | } | |
392 | ||
393 | return SR_OK; | |
394 | } | |
395 | ||
396 | static int hw_dev_config_set(const struct sr_dev_inst *sdi, int hwcap, | |
bbabddbd | 397 | const void *value) |
7dc55d93 AG |
398 | { |
399 | struct dev_context *devc; | |
400 | ||
401 | if (sdi->status != SR_ST_ACTIVE) | |
402 | return SR_ERR; | |
403 | ||
404 | if (!(devc = sdi->priv)) { | |
405 | sr_err("sdi->priv was NULL."); | |
406 | return SR_ERR_BUG; | |
407 | } | |
408 | ||
409 | switch (hwcap) { | |
410 | case SR_HWCAP_LIMIT_SAMPLES: | |
411 | devc->limit_samples = *(const uint64_t *)value; | |
412 | sr_dbg("Setting sample limit to %" PRIu64 ".", | |
413 | devc->limit_samples); | |
414 | break; | |
415 | default: | |
416 | sr_err("Unknown capability: %d.", hwcap); | |
417 | return SR_ERR; | |
418 | break; | |
419 | } | |
420 | ||
421 | return SR_OK; | |
422 | } | |
423 | ||
424 | static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, | |
bbabddbd | 425 | void *cb_data) |
7dc55d93 AG |
426 | { |
427 | struct sr_datafeed_packet packet; | |
428 | struct sr_datafeed_header header; | |
429 | struct sr_datafeed_meta_analog meta; | |
430 | struct dev_context *devc; | |
729b01f9 | 431 | int (*receive_data)(int, int, void *) = NULL; |
7dc55d93 AG |
432 | |
433 | if (!(devc = sdi->priv)) { | |
434 | sr_err("sdi->priv was NULL."); | |
435 | return SR_ERR_BUG; | |
436 | } | |
437 | ||
438 | sr_dbg("Starting acquisition."); | |
439 | ||
440 | devc->cb_data = cb_data; | |
441 | ||
bbabddbd UH |
442 | /* |
443 | * Reset the number of samples to take. If we've already collected our | |
7dc55d93 | 444 | * quota, but we start a new session, and don't reset this, we'll just |
bbabddbd UH |
445 | * quit without acquiring any new samples. |
446 | */ | |
7dc55d93 AG |
447 | devc->num_samples = 0; |
448 | ||
449 | /* Send header packet to the session bus. */ | |
450 | sr_dbg("Sending SR_DF_HEADER."); | |
451 | packet.type = SR_DF_HEADER; | |
452 | packet.payload = (uint8_t *)&header; | |
453 | header.feed_version = 1; | |
454 | gettimeofday(&header.starttime, NULL); | |
455 | sr_session_send(devc->cb_data, &packet); | |
456 | ||
457 | /* Send metadata about the SR_DF_ANALOG packets to come. */ | |
458 | sr_dbg("Sending SR_DF_META_ANALOG."); | |
459 | packet.type = SR_DF_META_ANALOG; | |
460 | packet.payload = &meta; | |
461 | meta.num_probes = 1; | |
462 | sr_session_send(devc->cb_data, &packet); | |
463 | ||
f086b830 UH |
464 | if (!strcmp(di->name, "digitek-dt4000zc")) |
465 | receive_data = digitek_dt4000zc_receive_data; | |
729b01f9 UH |
466 | if (!strcmp(di->name, "tekpower-tp4000zc")) |
467 | receive_data = tekpower_tp4000zc_receive_data; | |
ce3777ad UH |
468 | if (!strcmp(di->name, "metex-me31")) |
469 | receive_data = metex_me31_receive_data; | |
f0ac4929 UH |
470 | if (!strcmp(di->name, "peaktech-3410")) |
471 | receive_data = peaktech_3410_receive_data; | |
5887c9cc UH |
472 | if (!strcmp(di->name, "mastech-mas345")) |
473 | receive_data = mastech_mas345_receive_data; | |
6dca2f16 UH |
474 | if (!strcmp(di->name, "va-va18b")) |
475 | receive_data = va_va18b_receive_data; | |
729b01f9 | 476 | |
bbabddbd | 477 | /* Poll every 50ms, or whenever some data comes in. */ |
7dc55d93 | 478 | sr_source_add(devc->serial->fd, G_IO_IN, 50, |
729b01f9 | 479 | receive_data, (void *)sdi); |
7dc55d93 AG |
480 | |
481 | return SR_OK; | |
482 | } | |
483 | ||
69b07d14 | 484 | static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data) |
7dc55d93 AG |
485 | { |
486 | struct sr_datafeed_packet packet; | |
487 | struct dev_context *devc; | |
488 | ||
489 | if (sdi->status != SR_ST_ACTIVE) | |
490 | return SR_ERR; | |
491 | ||
492 | if (!(devc = sdi->priv)) { | |
493 | sr_err("sdi->priv was NULL."); | |
494 | return SR_ERR_BUG; | |
495 | } | |
496 | ||
497 | sr_dbg("Stopping acquisition."); | |
498 | ||
499 | sr_source_remove(devc->serial->fd); | |
500 | hw_dev_close((struct sr_dev_inst *)sdi); | |
501 | ||
502 | /* Send end packet to the session bus. */ | |
503 | sr_dbg("Sending SR_DF_END."); | |
504 | packet.type = SR_DF_END; | |
505 | sr_session_send(cb_data, &packet); | |
506 | ||
507 | return SR_OK; | |
508 | } | |
509 | ||
f086b830 UH |
510 | SR_PRIV struct sr_dev_driver digitek_dt4000zc_driver_info = { |
511 | .name = "digitek-dt4000zc", | |
512 | .longname = "Digitek DT4000ZC", | |
513 | .api_version = 1, | |
514 | .init = hw_init_digitek_dt4000zc, | |
515 | .cleanup = hw_cleanup, | |
516 | .scan = hw_scan, | |
517 | .dev_list = hw_dev_list, | |
518 | .dev_clear = clear_instances, | |
519 | .dev_open = hw_dev_open, | |
520 | .dev_close = hw_dev_close, | |
521 | .info_get = hw_info_get, | |
522 | .dev_config_set = hw_dev_config_set, | |
523 | .dev_acquisition_start = hw_dev_acquisition_start, | |
524 | .dev_acquisition_stop = hw_dev_acquisition_stop, | |
525 | .priv = NULL, | |
526 | }; | |
527 | ||
729b01f9 UH |
528 | SR_PRIV struct sr_dev_driver tekpower_tp4000zc_driver_info = { |
529 | .name = "tekpower-tp4000zc", | |
530 | .longname = "TekPower TP4000ZC", | |
7dc55d93 | 531 | .api_version = 1, |
729b01f9 | 532 | .init = hw_init_tekpower_tp4000zc, |
7dc55d93 AG |
533 | .cleanup = hw_cleanup, |
534 | .scan = hw_scan, | |
535 | .dev_list = hw_dev_list, | |
536 | .dev_clear = clear_instances, | |
537 | .dev_open = hw_dev_open, | |
538 | .dev_close = hw_dev_close, | |
539 | .info_get = hw_info_get, | |
540 | .dev_config_set = hw_dev_config_set, | |
541 | .dev_acquisition_start = hw_dev_acquisition_start, | |
542 | .dev_acquisition_stop = hw_dev_acquisition_stop, | |
543 | .priv = NULL, | |
544 | }; | |
ce3777ad UH |
545 | |
546 | SR_PRIV struct sr_dev_driver metex_me31_driver_info = { | |
547 | .name = "metex-me31", | |
548 | .longname = "Metex ME-31", | |
549 | .api_version = 1, | |
550 | .init = hw_init_metex_me31, | |
551 | .cleanup = hw_cleanup, | |
552 | .scan = hw_scan, | |
553 | .dev_list = hw_dev_list, | |
554 | .dev_clear = clear_instances, | |
555 | .dev_open = hw_dev_open, | |
556 | .dev_close = hw_dev_close, | |
557 | .info_get = hw_info_get, | |
558 | .dev_config_set = hw_dev_config_set, | |
559 | .dev_acquisition_start = hw_dev_acquisition_start, | |
560 | .dev_acquisition_stop = hw_dev_acquisition_stop, | |
561 | .priv = NULL, | |
562 | }; | |
f0ac4929 UH |
563 | |
564 | SR_PRIV struct sr_dev_driver peaktech_3410_driver_info = { | |
565 | .name = "peaktech-3410", | |
566 | .longname = "PeakTech 3410", | |
567 | .api_version = 1, | |
568 | .init = hw_init_peaktech_3410, | |
569 | .cleanup = hw_cleanup, | |
570 | .scan = hw_scan, | |
571 | .dev_list = hw_dev_list, | |
572 | .dev_clear = clear_instances, | |
573 | .dev_open = hw_dev_open, | |
574 | .dev_close = hw_dev_close, | |
575 | .info_get = hw_info_get, | |
576 | .dev_config_set = hw_dev_config_set, | |
577 | .dev_acquisition_start = hw_dev_acquisition_start, | |
578 | .dev_acquisition_stop = hw_dev_acquisition_stop, | |
579 | .priv = NULL, | |
580 | }; | |
5887c9cc UH |
581 | |
582 | SR_PRIV struct sr_dev_driver mastech_mas345_driver_info = { | |
583 | .name = "mastech-mas345", | |
584 | .longname = "MASTECH MAS345", | |
585 | .api_version = 1, | |
586 | .init = hw_init_mastech_mas345, | |
587 | .cleanup = hw_cleanup, | |
588 | .scan = hw_scan, | |
589 | .dev_list = hw_dev_list, | |
590 | .dev_clear = clear_instances, | |
591 | .dev_open = hw_dev_open, | |
592 | .dev_close = hw_dev_close, | |
593 | .info_get = hw_info_get, | |
594 | .dev_config_set = hw_dev_config_set, | |
595 | .dev_acquisition_start = hw_dev_acquisition_start, | |
596 | .dev_acquisition_stop = hw_dev_acquisition_stop, | |
597 | .priv = NULL, | |
598 | }; | |
6dca2f16 UH |
599 | |
600 | SR_PRIV struct sr_dev_driver va_va18b_driver_info = { | |
601 | .name = "va-va18b", | |
602 | .longname = "V&A VA18B", | |
603 | .api_version = 1, | |
604 | .init = hw_init_va_va18b, | |
605 | .cleanup = hw_cleanup, | |
606 | .scan = hw_scan, | |
607 | .dev_list = hw_dev_list, | |
608 | .dev_clear = clear_instances, | |
609 | .dev_open = hw_dev_open, | |
610 | .dev_close = hw_dev_close, | |
611 | .info_get = hw_info_get, | |
612 | .dev_config_set = hw_dev_config_set, | |
613 | .dev_acquisition_start = hw_dev_acquisition_start, | |
614 | .dev_acquisition_stop = hw_dev_acquisition_stop, | |
615 | .priv = NULL, | |
616 | }; |