]> sigrok.org Git - libsigrok.git/blame - src/hardware/yokogawa-dlm/api.c
Change type of SR_CONF keys to uint32_t.
[libsigrok.git] / src / hardware / yokogawa-dlm / api.c
CommitLineData
10763937
SA
1/*
2 * This file is part of the libsigrok project.
3 *
4 * Copyright (C) 2014 abraxa (Soeren Apel) <soeren@apelpie.net>
5 * Based on the Hameg HMO driver by poljar (Damir Jelić) <poljarinho@gmail.com>
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#include <stdlib.h>
22#include "protocol.h"
23
8ab929d6
SA
24SR_PRIV struct sr_dev_driver yokogawa_dlm_driver_info;
25static struct sr_dev_driver *di = &yokogawa_dlm_driver_info;
26
27static char *MANUFACTURER_ID = "YOKOGAWA";
28static char *MANUFACTURER_NAME = "Yokogawa";
29
30enum {
31 CG_INVALID = -1,
32 CG_NONE,
33 CG_ANALOG,
34 CG_DIGITAL,
35};
36
37static int init(struct sr_context *sr_ctx)
38{
39 return std_init(sr_ctx, di, LOG_PREFIX);
40}
41
42static struct sr_dev_inst *probe_usbtmc_device(struct sr_scpi_dev_inst *scpi)
43{
44 struct sr_dev_inst *sdi;
45 struct dev_context *devc;
46 struct sr_scpi_hw_info *hw_info;
47 char *model_name;
48 int model_index;
49
50 sdi = NULL;
51 devc = NULL;
52 hw_info = NULL;
53
54 if (sr_scpi_get_hw_id(scpi, &hw_info) != SR_OK) {
55 sr_info("Couldn't get IDN response.");
56 goto fail;
57 }
58
59 if (strcmp(hw_info->manufacturer, MANUFACTURER_ID) != 0)
60 goto fail;
61
62 if (dlm_model_get(hw_info->model, &model_name, &model_index) != SR_OK)
63 goto fail;
64
65 if (!(sdi = sr_dev_inst_new(0, SR_ST_ACTIVE, MANUFACTURER_NAME,
ac10a927 66 model_name, NULL)))
8ab929d6
SA
67 goto fail;
68
69 sr_scpi_hw_info_free(hw_info);
70 hw_info = NULL;
71
ac10a927 72 devc = g_malloc0(sizeof(struct dev_context));
8ab929d6
SA
73
74 sdi->driver = di;
75 sdi->priv = devc;
76 sdi->inst_type = SR_INST_SCPI;
77 sdi->conn = scpi;
78
79 if (dlm_device_init(sdi, model_index) != SR_OK)
80 goto fail;
81
82 sr_scpi_close(sdi->conn);
83
84 sdi->status = SR_ST_INACTIVE;
85 return sdi;
86
87fail:
88 if (hw_info)
89 sr_scpi_hw_info_free(hw_info);
90 if (sdi)
91 sr_dev_inst_free(sdi);
92 if (devc)
93 g_free(devc);
94
95 return NULL;
96}
97
98static GSList *scan(GSList *options)
99{
100 return sr_scpi_scan(di->priv, options, probe_usbtmc_device);
101}
102
103static GSList *dev_list(void)
104{
105 return ((struct drv_context *)(di->priv))->instances;
106}
107
108static void clear_helper(void *priv)
109{
110 struct dev_context *devc;
111
112 devc = priv;
113
114 dlm_scope_state_destroy(devc->model_state);
115
116 g_free(devc->analog_groups);
117 g_free(devc->digital_groups);
118 g_free(devc);
119}
120
121static int dev_clear(void)
122{
123 return std_dev_clear(di, clear_helper);
124}
125
126static int dev_open(struct sr_dev_inst *sdi)
127{
128 if (sdi->status != SR_ST_ACTIVE && sr_scpi_open(sdi->conn) != SR_OK)
129 return SR_ERR;
130
131 if (dlm_scope_state_query(sdi) != SR_OK)
132 return SR_ERR;
133
134 sdi->status = SR_ST_ACTIVE;
135
136 return SR_OK;
137}
138
139static int dev_close(struct sr_dev_inst *sdi)
140{
141 if (sdi->status == SR_ST_INACTIVE)
142 return SR_OK;
143
144 sr_scpi_close(sdi->conn);
145
146 sdi->status = SR_ST_INACTIVE;
147
148 return SR_OK;
149}
150
151static int cleanup(void)
152{
153 dev_clear();
154
155 return SR_OK;
156}
157
158/**
159 * Check which category a given channel group belongs to.
160 *
161 * @param devc Our internal device context.
162 * @param cg The channel group to check.
163 *
164 * @retval CG_NONE cg is NULL
165 * @retval CG_ANALOG cg is an analog group
166 * @retval CG_DIGITAL cg is a digital group
167 * @retval CG_INVALID cg is something else
168 */
169static int check_channel_group(struct dev_context *devc,
ac10a927 170 const struct sr_channel_group *cg)
8ab929d6
SA
171{
172 unsigned int i;
173 struct scope_config *model;
174
175 model = devc->model_config;
176
177 if (!cg)
178 return CG_NONE;
179
180 for (i = 0; i < model->analog_channels; ++i)
181 if (cg == devc->analog_groups[i])
182 return CG_ANALOG;
183
184 for (i = 0; i < model->pods; ++i)
185 if (cg == devc->digital_groups[i])
186 return CG_DIGITAL;
187
188 sr_err("Invalid channel group specified.");
189 return CG_INVALID;
190}
191
584560f1 192static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
ac10a927 193 const struct sr_channel_group *cg)
8ab929d6
SA
194{
195 int ret, cg_type;
196 unsigned int i;
197 struct dev_context *devc;
198 struct scope_config *model;
199 struct scope_state *state;
200
201 if (!sdi || !(devc = sdi->priv))
202 return SR_ERR_ARG;
203
204 if ((cg_type = check_channel_group(devc, cg)) == CG_INVALID)
205 return SR_ERR;
206
207 ret = SR_ERR_NA;
208 model = devc->model_config;
209 state = devc->model_state;
210
211 switch (key) {
212 case SR_CONF_NUM_TIMEBASE:
213 *data = g_variant_new_int32(model->num_xdivs);
214 ret = SR_OK;
215 break;
216 case SR_CONF_TIMEBASE:
217 *data = g_variant_new("(tt)",
ac10a927
SA
218 (*model->timebases)[state->timebase][0],
219 (*model->timebases)[state->timebase][1]);
8ab929d6
SA
220 ret = SR_OK;
221 break;
222 case SR_CONF_NUM_VDIV:
223 if (cg_type == CG_NONE) {
224 sr_err("No channel group specified.");
225 return SR_ERR_CHANNEL_GROUP;
226 } else if (cg_type == CG_ANALOG) {
227 *data = g_variant_new_int32(model->num_ydivs);
228 ret = SR_OK;
229 break;
230 } else {
231 ret = SR_ERR_NA;
232 }
233 break;
234 case SR_CONF_VDIV:
235 ret = SR_ERR_NA;
236 if (cg_type == CG_NONE) {
237 sr_err("No channel group specified.");
238 return SR_ERR_CHANNEL_GROUP;
239 } else if (cg_type != CG_ANALOG)
240 break;
241
242 for (i = 0; i < model->analog_channels; ++i) {
243 if (cg != devc->analog_groups[i])
244 continue;
245 *data = g_variant_new("(tt)",
ac10a927
SA
246 (*model->vdivs)[state->analog_states[i].vdiv][0],
247 (*model->vdivs)[state->analog_states[i].vdiv][1]);
8ab929d6
SA
248 ret = SR_OK;
249 break;
250 }
251 break;
252 case SR_CONF_TRIGGER_SOURCE:
253 *data = g_variant_new_string((*model->trigger_sources)[state->trigger_source]);
254 ret = SR_OK;
255 break;
256 case SR_CONF_TRIGGER_SLOPE:
257 *data = g_variant_new_string((*model->trigger_slopes)[state->trigger_slope]);
258 ret = SR_OK;
259 break;
260 case SR_CONF_HORIZ_TRIGGERPOS:
261 *data = g_variant_new_double(state->horiz_triggerpos);
262 ret = SR_OK;
263 break;
264 case SR_CONF_COUPLING:
265 ret = SR_ERR_NA;
266 if (cg_type == CG_NONE) {
267 sr_err("No channel group specified.");
268 return SR_ERR_CHANNEL_GROUP;
269 } else if (cg_type != CG_ANALOG)
270 break;
271
272 for (i = 0; i < model->analog_channels; ++i) {
273 if (cg != devc->analog_groups[i])
274 continue;
275 *data = g_variant_new_string((*model->coupling_options)[state->analog_states[i].coupling]);
276 ret = SR_OK;
277 break;
278 }
279 break;
280 case SR_CONF_SAMPLERATE:
281 *data = g_variant_new_uint64(state->sample_rate);
282 ret = SR_OK;
283 break;
284 default:
285 ret = SR_ERR_NA;
286 }
287
288 return ret;
289}
290
291static GVariant *build_tuples(const uint64_t (*array)[][2], unsigned int n)
292{
293 unsigned int i;
294 GVariant *rational[2];
295 GVariantBuilder gvb;
296
297 g_variant_builder_init(&gvb, G_VARIANT_TYPE_ARRAY);
298
299 for (i = 0; i < n; i++) {
300 rational[0] = g_variant_new_uint64((*array)[i][0]);
301 rational[1] = g_variant_new_uint64((*array)[i][1]);
302
303 /* FIXME: Valgrind reports a memory leak here. */
304 g_variant_builder_add_value(&gvb, g_variant_new_tuple(rational, 2));
305 }
306
307 return g_variant_builder_end(&gvb);
308}
309
584560f1 310static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
ac10a927 311 const struct sr_channel_group *cg)
8ab929d6
SA
312{
313 int ret, cg_type;
314 unsigned int i, j;
315 char float_str[30];
316 struct dev_context *devc;
317 struct scope_config *model;
318 struct scope_state *state;
319 const char *tmp;
320 uint64_t p, q;
321 double tmp_d;
322 gboolean update_sample_rate;
323
324 if (!sdi || !(devc = sdi->priv))
325 return SR_ERR_ARG;
326
327 if ((cg_type = check_channel_group(devc, cg)) == CG_INVALID)
328 return SR_ERR;
329
330 model = devc->model_config;
331 state = devc->model_state;
332 update_sample_rate = FALSE;
333
334 ret = SR_ERR_NA;
335
336 switch (key) {
337 case SR_CONF_LIMIT_FRAMES:
338 devc->frame_limit = g_variant_get_uint64(data);
339 ret = SR_OK;
340 break;
341 case SR_CONF_TRIGGER_SOURCE:
342 tmp = g_variant_get_string(data, NULL);
343 for (i = 0; (*model->trigger_sources)[i]; i++) {
344 if (g_strcmp0(tmp, (*model->trigger_sources)[i]) != 0)
345 continue;
346 state->trigger_source = i;
347 /* TODO: A and B trigger support possible? */
348 ret = dlm_trigger_source_set(sdi->conn, (*model->trigger_sources)[i]);
349 break;
350 }
351 break;
352 case SR_CONF_VDIV:
353 if (cg_type == CG_NONE) {
354 sr_err("No channel group specified.");
355 return SR_ERR_CHANNEL_GROUP;
356 }
357
358 g_variant_get(data, "(tt)", &p, &q);
359
360 for (i = 0; i < model->num_vdivs; i++) {
361 if (p != (*model->vdivs)[i][0] ||
ac10a927 362 q != (*model->vdivs)[i][1])
8ab929d6
SA
363 continue;
364 for (j = 1; j <= model->analog_channels; ++j) {
365 if (cg != devc->analog_groups[j - 1])
366 continue;
367 state->analog_states[j - 1].vdiv = i;
368 g_ascii_formatd(float_str, sizeof(float_str),
369 "%E", (float) p / q);
370 if (dlm_analog_chan_vdiv_set(sdi->conn, j, float_str) != SR_OK ||
ac10a927 371 sr_scpi_get_opc(sdi->conn) != SR_OK)
8ab929d6
SA
372 return SR_ERR;
373
374 break;
375 }
376
377 ret = SR_OK;
378 break;
379 }
380 break;
381 case SR_CONF_TIMEBASE:
382 g_variant_get(data, "(tt)", &p, &q);
383
384 for (i = 0; i < model->num_timebases; i++) {
385 if (p != (*model->timebases)[i][0] ||
ac10a927 386 q != (*model->timebases)[i][1])
8ab929d6
SA
387 continue;
388 state->timebase = i;
389 g_ascii_formatd(float_str, sizeof(float_str),
390 "%E", (float) p / q);
391 ret = dlm_timebase_set(sdi->conn, float_str);
392 update_sample_rate = TRUE;
393 break;
394 }
395 break;
396 case SR_CONF_HORIZ_TRIGGERPOS:
397 tmp_d = g_variant_get_double(data);
398
399 /* TODO: Check if the calculation makes sense for the DLM. */
400 if (tmp_d < 0.0 || tmp_d > 1.0)
401 return SR_ERR;
402
403 state->horiz_triggerpos = tmp_d;
404 tmp_d = -(tmp_d - 0.5) *
ac10a927
SA
405 ((double) (*model->timebases)[state->timebase][0] /
406 (*model->timebases)[state->timebase][1])
407 * model->num_xdivs;
8ab929d6
SA
408
409 g_ascii_formatd(float_str, sizeof(float_str), "%E", tmp_d);
410 ret = dlm_horiz_trigger_pos_set(sdi->conn, float_str);
411 break;
412 case SR_CONF_TRIGGER_SLOPE:
413 tmp = g_variant_get_string(data, NULL);
414
415 if (!tmp || !(tmp[0] == 'f' || tmp[0] == 'r'))
416 return SR_ERR_ARG;
417
418 /* Note: See dlm_trigger_slopes[] in protocol.c. */
419 state->trigger_slope = (tmp[0] == 'r') ?
420 SLOPE_POSITIVE : SLOPE_NEGATIVE;
421
422 ret = dlm_trigger_slope_set(sdi->conn, state->trigger_slope);
423 break;
424 case SR_CONF_COUPLING:
425 if (cg_type == CG_NONE) {
426 sr_err("No channel group specified.");
427 return SR_ERR_CHANNEL_GROUP;
428 }
429
430 tmp = g_variant_get_string(data, NULL);
431
432 for (i = 0; (*model->coupling_options)[i]; i++) {
433 if (strcmp(tmp, (*model->coupling_options)[i]) != 0)
434 continue;
435 for (j = 1; j <= model->analog_channels; ++j) {
436 if (cg != devc->analog_groups[j - 1])
437 continue;
438 state->analog_states[j-1].coupling = i;
439
440 if (dlm_analog_chan_coupl_set(sdi->conn, j, tmp) != SR_OK ||
ac10a927 441 sr_scpi_get_opc(sdi->conn) != SR_OK)
8ab929d6
SA
442 return SR_ERR;
443 break;
444 }
445
446 ret = SR_OK;
447 break;
448 }
449 break;
450 default:
451 ret = SR_ERR_NA;
452 break;
453 }
454
455 if (ret == SR_OK)
456 ret = sr_scpi_get_opc(sdi->conn);
457
458 if (ret == SR_OK && update_sample_rate)
459 ret = dlm_sample_rate_query(sdi);
460
461 return ret;
462}
463
584560f1 464static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
ac10a927 465 const struct sr_channel_group *cg)
8ab929d6
SA
466{
467 int cg_type;
468 struct dev_context *devc;
469 struct scope_config *model;
470
471 if (!sdi || !(devc = sdi->priv))
472 return SR_ERR_ARG;
473
474 if ((cg_type = check_channel_group(devc, cg)) == CG_INVALID)
475 return SR_ERR;
476
477 model = devc->model_config;
478
479 switch (key) {
480 case SR_CONF_SCAN_OPTIONS:
481 *data = NULL;
482 break;
483 case SR_CONF_DEVICE_OPTIONS:
484 if (cg_type == CG_NONE) {
584560f1
BV
485 *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
486 model->hw_caps, model->num_hwcaps, sizeof(uint32_t));
8ab929d6 487 } else if (cg_type == CG_ANALOG) {
584560f1
BV
488 *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
489 model->analog_hwcaps, model->num_analog_hwcaps, sizeof(uint32_t));
8ab929d6 490 } else {
584560f1
BV
491 *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
492 NULL, 0, sizeof(uint32_t));
8ab929d6
SA
493 }
494 break;
495 case SR_CONF_COUPLING:
496 if (cg_type == CG_NONE)
497 return SR_ERR_CHANNEL_GROUP;
498 *data = g_variant_new_strv(*model->coupling_options,
ac10a927 499 g_strv_length((char **)*model->coupling_options));
8ab929d6
SA
500 break;
501 case SR_CONF_TRIGGER_SOURCE:
502 *data = g_variant_new_strv(*model->trigger_sources,
ac10a927 503 g_strv_length((char **)*model->trigger_sources));
8ab929d6
SA
504 break;
505 case SR_CONF_TRIGGER_SLOPE:
506 *data = g_variant_new_strv(*model->trigger_slopes,
ac10a927 507 g_strv_length((char **)*model->trigger_slopes));
8ab929d6
SA
508 break;
509 case SR_CONF_TIMEBASE:
510 *data = build_tuples(model->timebases, model->num_timebases);
511 break;
512 case SR_CONF_VDIV:
513 if (cg_type == CG_NONE)
514 return SR_ERR_CHANNEL_GROUP;
515 *data = build_tuples(model->vdivs, model->num_vdivs);
516 break;
517 default:
518 return SR_ERR_NA;
519 }
520
521 return SR_OK;
522}
523
524static int dlm_check_channels(GSList *channels)
525{
526 GSList *l;
527 struct sr_channel *ch;
528 gboolean enabled_pod1, enabled_chan4;
529
530 enabled_pod1 = enabled_chan4 = FALSE;
531
532 /* Note: On the DLM2000, CH4 and Logic are shared. */
533 /* TODO Handle non-DLM2000 models. */
534 for (l = channels; l; l = l->next) {
535 ch = l->data;
536 switch (ch->type) {
537 case SR_CHANNEL_ANALOG:
538 if (ch->index == 3)
539 enabled_chan4 = TRUE;
540 break;
541 case SR_CHANNEL_LOGIC:
542 enabled_pod1 = TRUE;
543 break;
544 default:
545 return SR_ERR;
546 }
547 }
548
549 if (enabled_pod1 && enabled_chan4)
550 return SR_ERR;
551
552 return SR_OK;
553}
554
555static int dlm_setup_channels(const struct sr_dev_inst *sdi)
556{
557 GSList *l;
558 unsigned int i;
559 gboolean *pod_enabled, setup_changed;
560 struct scope_state *state;
561 struct scope_config *model;
562 struct sr_channel *ch;
563 struct dev_context *devc;
564 struct sr_scpi_dev_inst *scpi;
565
566 devc = sdi->priv;
567 scpi = sdi->conn;
568 state = devc->model_state;
569 model = devc->model_config;
570 setup_changed = FALSE;
571
ac10a927 572 pod_enabled = g_malloc0(sizeof(gboolean) * model->pods);
8ab929d6
SA
573
574 for (l = sdi->channels; l; l = l->next) {
575 ch = l->data;
576 switch (ch->type) {
577 case SR_CHANNEL_ANALOG:
578 if (ch->enabled == state->analog_states[ch->index].state)
579 break;
580
581 if (dlm_analog_chan_state_set(scpi, ch->index + 1,
ac10a927 582 ch->enabled) != SR_OK)
8ab929d6
SA
583 return SR_ERR;
584
585 state->analog_states[ch->index].state = ch->enabled;
586 setup_changed = TRUE;
587 break;
588 case SR_CHANNEL_LOGIC:
589 if (ch->enabled)
590 pod_enabled[ch->index / 8] = TRUE;
591
592 if (ch->enabled == state->digital_states[ch->index])
593 break;
594
595 if (dlm_digital_chan_state_set(scpi, ch->index + 1,
ac10a927 596 ch->enabled) != SR_OK)
8ab929d6
SA
597 return SR_ERR;
598
599 state->digital_states[ch->index] = ch->enabled;
600 setup_changed = TRUE;
601 break;
602 default:
603 return SR_ERR;
604 }
605 }
606
607 for (i = 1; i <= model->pods; ++i) {
608 if (state->pod_states[i - 1] == pod_enabled[i - 1])
609 continue;
610
611 if (dlm_digital_pod_state_set(scpi, i,
ac10a927 612 pod_enabled[i - 1]) != SR_OK)
8ab929d6
SA
613 return SR_ERR;
614
615 state->pod_states[i - 1] = pod_enabled[i - 1];
616 setup_changed = TRUE;
617 }
618
619 g_free(pod_enabled);
620
621 if (setup_changed && dlm_sample_rate_query(sdi) != SR_OK)
622 return SR_ERR;
623
624 return SR_OK;
625}
626
627static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
628{
629 GSList *l;
630 gboolean digital_added;
631 struct sr_channel *ch;
632 struct dev_context *devc;
633 struct sr_scpi_dev_inst *scpi;
634
635 (void)cb_data;
636
ac10a927
SA
637 if (sdi->status != SR_ST_ACTIVE)
638 return SR_ERR_DEV_CLOSED;
8ab929d6
SA
639
640 scpi = sdi->conn;
641 devc = sdi->priv;
642 digital_added = FALSE;
643
644 g_slist_free(devc->enabled_channels);
645 devc->enabled_channels = NULL;
646
647 for (l = sdi->channels; l; l = l->next) {
648 ch = l->data;
649 if (!ch->enabled)
650 continue;
651 /* Only add a single digital channel. */
652 if (ch->type != SR_CHANNEL_LOGIC || !digital_added) {
653 devc->enabled_channels = g_slist_append(
ac10a927
SA
654 devc->enabled_channels, ch);
655 if (ch->type == SR_CHANNEL_LOGIC)
656 digital_added = TRUE;
8ab929d6
SA
657 }
658 }
659
660 if (!devc->enabled_channels)
661 return SR_ERR;
662
663 if (dlm_check_channels(devc->enabled_channels) != SR_OK) {
664 sr_err("Invalid channel configuration specified!");
665 return SR_ERR_NA;
666 }
667
668 if (dlm_setup_channels(sdi) != SR_OK) {
669 sr_err("Failed to setup channel configuration!");
670 return SR_ERR;
671 }
672
af3487ec
SA
673 /* Request data for the first enabled channel. */
674 devc->current_channel = devc->enabled_channels;
675 dlm_channel_data_request(sdi);
676
0028d5a1
SA
677 /* Call our callback when data comes in or after 5ms. */
678 sr_scpi_source_add(sdi->session, scpi, G_IO_IN, 5,
8ab929d6
SA
679 dlm_data_receive, (void *)sdi);
680
681 return SR_OK;
682}
683
684static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
685{
686 struct dev_context *devc;
8ab929d6
SA
687 struct sr_datafeed_packet packet;
688
689 (void)cb_data;
690
691 packet.type = SR_DF_END;
692 packet.payload = NULL;
693 sr_session_send(sdi, &packet);
694
695 if (sdi->status != SR_ST_ACTIVE)
696 return SR_ERR_DEV_CLOSED;
697
698 devc = sdi->priv;
699
700 devc->num_frames = 0;
701 g_slist_free(devc->enabled_channels);
702 devc->enabled_channels = NULL;
af3487ec
SA
703
704 sr_scpi_source_remove(sdi->session, sdi->conn);
8ab929d6
SA
705
706 return SR_OK;
707}
10763937
SA
708
709SR_PRIV struct sr_dev_driver yokogawa_dlm_driver_info = {
710 .name = "yokogawa-dlm",
ac10a927 711 .longname = "Yokogawa DL/DLM",
10763937 712 .api_version = 1,
8ab929d6
SA
713 .init = init,
714 .cleanup = cleanup,
715 .scan = scan,
716 .dev_list = dev_list,
717 .dev_clear = dev_clear,
718 .config_get = config_get,
719 .config_set = config_set,
720 .config_list = config_list,
721 .dev_open = dev_open,
722 .dev_close = dev_close,
723 .dev_acquisition_start = dev_acquisition_start,
724 .dev_acquisition_stop = dev_acquisition_stop,
10763937
SA
725 .priv = NULL,
726};