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