2 * This file is part of the libsigrok project.
4 * Copyright (C) 2012 Martin Ling <martin-git@earth.li>
5 * Copyright (C) 2013 Bert Vermeulen <bert@biot.com>
6 * Copyright (C) 2013 Mathias Grimmberger <mgri@zaphod.sax.de>
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.
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.
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/>.
27 #include "libsigrok.h"
28 #include "libsigrok-internal.h"
31 static const int32_t hwopts[] = {
36 static const int32_t hwcaps[] = {
39 SR_CONF_TRIGGER_SOURCE,
40 SR_CONF_TRIGGER_SLOPE,
41 SR_CONF_HORIZ_TRIGGERPOS,
45 static const int32_t analog_hwcaps[] = {
52 static const uint64_t timebases[][2] = {
91 /* { 1000, 1 }, Confuses other code? */
94 static const uint64_t vdivs[][2] = {
114 #define NUM_TIMEBASE ARRAY_SIZE(timebases)
115 #define NUM_VDIV ARRAY_SIZE(vdivs)
117 static const char *trigger_sources[] = {
140 static const char *coupling[] = {
146 /* Do not change the order of entries */
147 static const char *data_sources[] = {
154 * name, series, protocol flavor, min timebase, max timebase, min vdiv,
155 * digital channels, number of horizontal divs
157 static const struct rigol_ds_model supported_models[] = {
158 {"DS1052E", RIGOL_DS1000, PROTOCOL_LEGACY, {5, 1000000000}, {50, 1}, {2, 1000}, false, 12},
159 {"DS1102E", RIGOL_DS1000, PROTOCOL_LEGACY, {2, 1000000000}, {50, 1}, {2, 1000}, false, 12},
160 {"DS1152E", RIGOL_DS1000, PROTOCOL_LEGACY, {2, 1000000000}, {50, 1}, {2, 1000}, false, 12},
161 {"DS1052D", RIGOL_DS1000, PROTOCOL_LEGACY, {5, 1000000000}, {50, 1}, {2, 1000}, true, 12},
162 {"DS1102D", RIGOL_DS1000, PROTOCOL_LEGACY, {2, 1000000000}, {50, 1}, {2, 1000}, true, 12},
163 {"DS1152D", RIGOL_DS1000, PROTOCOL_LEGACY, {2, 1000000000}, {50, 1}, {2, 1000}, true, 12},
164 {"DS2072", RIGOL_DS2000, PROTOCOL_IEEE488_2, {5, 1000000000}, {500, 1}, {500, 1000000}, false, 14},
165 {"DS2102", RIGOL_DS2000, PROTOCOL_IEEE488_2, {5, 1000000000}, {500, 1}, {500, 1000000}, false, 14},
166 {"DS2202", RIGOL_DS2000, PROTOCOL_IEEE488_2, {2, 1000000000}, {500, 1}, {500, 1000000}, false, 14},
169 SR_PRIV struct sr_dev_driver rigol_ds_driver_info;
170 static struct sr_dev_driver *di = &rigol_ds_driver_info;
172 static void clear_helper(void *priv)
174 struct dev_context *devc;
178 g_free(devc->buffer);
179 g_free(devc->coupling[0]);
180 g_free(devc->coupling[1]);
181 g_free(devc->trigger_source);
182 g_free(devc->trigger_slope);
183 g_slist_free(devc->analog_groups[0].probes);
184 g_slist_free(devc->analog_groups[1].probes);
185 g_slist_free(devc->digital_group.probes);
188 static int dev_clear(void)
190 return std_dev_clear(di, clear_helper);
193 static int set_cfg(const struct sr_dev_inst *sdi, const char *format, ...)
198 va_start(args, format);
199 ret = sr_scpi_send_variadic(sdi->conn, format, args);
205 /* When setting a bunch of parameters in a row, the DS1052E scrambles
206 * some of them unless there is at least 100ms delay in between. */
207 sr_spew("delay %dms", 100);
213 static int init(struct sr_context *sr_ctx)
215 return std_init(sr_ctx, di, LOG_PREFIX);
218 static int probe_port(const char *resource, const char *serialcomm, GSList **devices)
220 struct dev_context *devc;
221 struct sr_dev_inst *sdi;
222 const char *usbtmc_prefix = "/dev/usbtmc";
223 const char *tcp_prefix = "tcp/";
224 gchar **tokens, *address, *port;
225 struct sr_scpi_dev_inst *scpi;
226 struct sr_scpi_hw_info *hw_info;
227 struct sr_probe *probe;
229 const struct rigol_ds_model *model = NULL;
234 if (strncmp(resource, usbtmc_prefix, strlen(usbtmc_prefix)) == 0) {
235 sr_dbg("Opening USBTMC device %s", resource);
236 if (!(scpi = scpi_usbtmc_dev_inst_new(resource)))
237 return SR_ERR_MALLOC;
238 } else if (strncmp(resource, tcp_prefix, strlen(tcp_prefix)) == 0) {
239 sr_dbg("Opening TCP connection %s", resource);
240 tokens = g_strsplit(resource + strlen(tcp_prefix), "/", 0);
243 if (!address || !port || tokens[2]) {
244 sr_dbg("Invalid parameters");
248 scpi = scpi_tcp_dev_inst_new(address, port);
251 return SR_ERR_MALLOC;
253 sr_dbg("Opening serial device %s", resource);
254 if (!(scpi = scpi_serial_dev_inst_new(resource, serialcomm)))
255 return SR_ERR_MALLOC;
258 if (sr_scpi_open(scpi) != SR_OK) {
263 if (sr_scpi_get_hw_id(scpi, &hw_info) != SR_OK) {
264 sr_info("Couldn't get IDN response.");
270 if (strcasecmp(hw_info->manufacturer, "Rigol Technologies")) {
271 sr_scpi_hw_info_free(hw_info);
276 for (i = 0; i < ARRAY_SIZE(supported_models); i++) {
277 if (!strcmp(hw_info->model, supported_models[i].name)) {
278 model = &supported_models[i];
283 if (!model || !(sdi = sr_dev_inst_new(0, SR_ST_ACTIVE,
284 hw_info->manufacturer, hw_info->model,
285 hw_info->firmware_version))) {
286 sr_scpi_hw_info_free(hw_info);
291 sr_scpi_hw_info_free(hw_info);
296 sdi->inst_type = SR_INST_SCPI;
298 if (!(devc = g_try_malloc0(sizeof(struct dev_context))))
299 return SR_ERR_MALLOC;
301 devc->limit_frames = 0;
304 for (i = 0; i < 2; i++) {
305 channel_name = (i == 0 ? "CH1" : "CH2");
306 if (!(probe = sr_probe_new(i, SR_PROBE_ANALOG, TRUE, channel_name)))
307 return SR_ERR_MALLOC;
308 sdi->probes = g_slist_append(sdi->probes, probe);
309 devc->analog_groups[i].name = channel_name;
310 devc->analog_groups[i].probes = g_slist_append(NULL, probe);
311 sdi->probe_groups = g_slist_append(sdi->probe_groups,
312 &devc->analog_groups[i]);
315 if (devc->model->has_digital) {
316 for (i = 0; i < 16; i++) {
317 if (!(channel_name = g_strdup_printf("D%d", i)))
318 return SR_ERR_MALLOC;
319 probe = sr_probe_new(i, SR_PROBE_LOGIC, TRUE, channel_name);
320 g_free(channel_name);
322 return SR_ERR_MALLOC;
323 sdi->probes = g_slist_append(sdi->probes, probe);
324 devc->digital_group.probes = g_slist_append(
325 devc->digital_group.probes, probe);
327 devc->digital_group.name = "LA";
328 sdi->probe_groups = g_slist_append(sdi->probe_groups,
329 &devc->digital_group);
332 for (i = 0; i < NUM_TIMEBASE; i++) {
333 if (!memcmp(&devc->model->min_timebase, &timebases[i], sizeof(uint64_t[2])))
334 devc->timebases = &timebases[i];
335 if (!memcmp(&devc->model->max_timebase, &timebases[i], sizeof(uint64_t[2])))
336 devc->num_timebases = &timebases[i] - devc->timebases + 1;
339 for (i = 0; i < NUM_VDIV; i++) {
340 if (!memcmp(&devc->model->min_vdiv, &vdivs[i], sizeof(uint64_t[2]))) {
341 devc->vdivs = &vdivs[i];
342 devc->num_vdivs = NUM_VDIV - (&vdivs[i] - &vdivs[0]);
346 if (!(devc->buffer = g_try_malloc(ACQ_BUFFER_SIZE)))
347 return SR_ERR_MALLOC;
348 if (!(devc->data = g_try_malloc(ACQ_BUFFER_SIZE * sizeof(float))))
349 return SR_ERR_MALLOC;
351 devc->data_source = DATA_SOURCE_LIVE;
355 *devices = g_slist_append(NULL, sdi);
360 static GSList *scan(GSList *options)
362 struct drv_context *drvc;
363 struct sr_config *src;
367 const gchar *dev_name;
369 gchar *serialcomm = NULL;
373 for (l = options; l; l = l->next) {
377 port = (char *)g_variant_get_string(src->data, NULL);
379 case SR_CONF_SERIALCOMM:
380 serialcomm = (char *)g_variant_get_string(src->data, NULL);
387 if (probe_port(port, serialcomm, &devices) == SR_ERR_MALLOC) {
394 if (!(dir = g_dir_open("/sys/class/usbmisc/", 0, NULL)))
395 if (!(dir = g_dir_open("/sys/class/usb/", 0, NULL)))
397 while ((dev_name = g_dir_read_name(dir))) {
398 if (strncmp(dev_name, "usbtmc", 6))
400 port = g_strconcat("/dev/", dev_name, NULL);
401 ret = probe_port(port, serialcomm, &devices);
405 if (ret == SR_ERR_MALLOC) {
413 /* Tack a copy of the newly found devices onto the driver list. */
414 l = g_slist_copy(devices);
415 drvc->instances = g_slist_concat(drvc->instances, l);
420 static GSList *dev_list(void)
422 return ((struct drv_context *)(di->priv))->instances;
425 static int dev_open(struct sr_dev_inst *sdi)
427 struct sr_scpi_dev_inst *scpi = sdi->conn;
429 if (sr_scpi_open(scpi) < 0)
432 if (rigol_ds_get_dev_cfg(sdi) != SR_OK)
435 sdi->status = SR_ST_ACTIVE;
440 static int dev_close(struct sr_dev_inst *sdi)
442 struct sr_scpi_dev_inst *scpi;
447 if (sr_scpi_close(scpi) < 0)
449 sdi->status = SR_ST_INACTIVE;
455 static int cleanup(void)
460 static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
461 const struct sr_probe_group *probe_group)
463 struct dev_context *devc;
466 if (!sdi || !(devc = sdi->priv))
469 /* If a probe group is specified, it must be a valid one. */
471 if (probe_group != &devc->analog_groups[0]
472 && probe_group != &devc->analog_groups[1]) {
473 sr_err("Invalid probe group specified.");
479 case SR_CONF_NUM_TIMEBASE:
480 *data = g_variant_new_int32(devc->num_timebases);
482 case SR_CONF_NUM_VDIV:
484 sr_err("No probe group specified.");
485 return SR_ERR_PROBE_GROUP;
487 for (i = 0; i < 2; i++) {
488 if (probe_group == &devc->analog_groups[i]) {
489 *data = g_variant_new_int32(devc->num_vdivs);
494 case SR_CONF_DATA_SOURCE:
495 if (devc->data_source == DATA_SOURCE_LIVE)
496 *data = g_variant_new_string("Live");
497 else if (devc->data_source == DATA_SOURCE_MEMORY)
498 *data = g_variant_new_string("Memory");
500 *data = g_variant_new_string("Segmented");
509 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
510 const struct sr_probe_group *probe_group)
512 struct dev_context *devc;
513 uint64_t tmp_u64, p, q;
519 if (!(devc = sdi->priv))
522 if (sdi->status != SR_ST_ACTIVE)
523 return SR_ERR_DEV_CLOSED;
525 /* If a probe group is specified, it must be a valid one. */
527 if (probe_group != &devc->analog_groups[0]
528 && probe_group != &devc->analog_groups[1]) {
529 sr_err("Invalid probe group specified.");
536 case SR_CONF_LIMIT_FRAMES:
537 devc->limit_frames = g_variant_get_uint64(data);
539 case SR_CONF_TRIGGER_SLOPE:
540 tmp_u64 = g_variant_get_uint64(data);
541 if (tmp_u64 != 0 && tmp_u64 != 1)
543 g_free(devc->trigger_slope);
544 devc->trigger_slope = g_strdup(tmp_u64 ? "POS" : "NEG");
545 ret = set_cfg(sdi, ":TRIG:EDGE:SLOP %s", devc->trigger_slope);
547 case SR_CONF_HORIZ_TRIGGERPOS:
548 t_dbl = g_variant_get_double(data);
549 if (t_dbl < 0.0 || t_dbl > 1.0)
551 devc->horiz_triggerpos = t_dbl;
552 /* We have the trigger offset as a percentage of the frame, but
553 * need to express this in seconds. */
554 t_dbl = -(devc->horiz_triggerpos - 0.5) * devc->timebase * devc->num_timebases;
555 ret = set_cfg(sdi, ":TIM:OFFS %.6f", t_dbl);
557 case SR_CONF_TIMEBASE:
558 g_variant_get(data, "(tt)", &p, &q);
559 for (i = 0; i < devc->num_timebases; i++) {
560 if (devc->timebases[i][0] == p && devc->timebases[i][1] == q) {
561 devc->timebase = (float)p / q;
562 ret = set_cfg(sdi, ":TIM:SCAL %.9f", devc->timebase);
566 if (i == devc->num_timebases)
569 case SR_CONF_TRIGGER_SOURCE:
570 tmp_str = g_variant_get_string(data, NULL);
571 for (i = 0; i < ARRAY_SIZE(trigger_sources); i++) {
572 if (!strcmp(trigger_sources[i], tmp_str)) {
573 g_free(devc->trigger_source);
574 devc->trigger_source = g_strdup(trigger_sources[i]);
575 if (!strcmp(devc->trigger_source, "AC Line"))
577 else if (!strcmp(devc->trigger_source, "CH1"))
579 else if (!strcmp(devc->trigger_source, "CH2"))
582 tmp_str = (char *)devc->trigger_source;
583 ret = set_cfg(sdi, ":TRIG:EDGE:SOUR %s", tmp_str);
587 if (i == ARRAY_SIZE(trigger_sources))
592 sr_err("No probe group specified.");
593 return SR_ERR_PROBE_GROUP;
595 g_variant_get(data, "(tt)", &p, &q);
596 for (i = 0; i < 2; i++) {
597 if (probe_group == &devc->analog_groups[i]) {
598 for (j = 0; j < ARRAY_SIZE(vdivs); j++) {
599 if (vdivs[j][0] != p || vdivs[j][1] != q)
601 devc->vdiv[i] = (float)p / q;
602 return set_cfg(sdi, ":CHAN%d:SCAL %.3f", i + 1,
609 case SR_CONF_COUPLING:
611 sr_err("No probe group specified.");
612 return SR_ERR_PROBE_GROUP;
614 tmp_str = g_variant_get_string(data, NULL);
615 for (i = 0; i < 2; i++) {
616 if (probe_group == &devc->analog_groups[i]) {
617 for (j = 0; j < ARRAY_SIZE(coupling); j++) {
618 if (!strcmp(tmp_str, coupling[j])) {
619 g_free(devc->coupling[i]);
620 devc->coupling[i] = g_strdup(coupling[j]);
621 return set_cfg(sdi, ":CHAN%d:COUP %s", i + 1,
629 case SR_CONF_DATA_SOURCE:
630 tmp_str = g_variant_get_string(data, NULL);
631 if (!strcmp(tmp_str, "Live"))
632 devc->data_source = DATA_SOURCE_LIVE;
633 else if (!strcmp(tmp_str, "Memory"))
634 devc->data_source = DATA_SOURCE_MEMORY;
635 else if (devc->model->protocol == PROTOCOL_IEEE488_2
636 && !strcmp(tmp_str, "Segmented"))
637 devc->data_source = DATA_SOURCE_SEGMENTED;
649 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
650 const struct sr_probe_group *probe_group)
652 GVariant *tuple, *rational[2];
655 struct dev_context *devc = NULL;
660 if (key == SR_CONF_SCAN_OPTIONS) {
661 *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32,
662 hwopts, ARRAY_SIZE(hwopts), sizeof(int32_t));
664 } else if (key == SR_CONF_DEVICE_OPTIONS && probe_group == NULL) {
665 *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32,
666 hwcaps, ARRAY_SIZE(hwcaps), sizeof(int32_t));
670 /* Every other option requires a valid device instance. */
671 if (!sdi || !(devc = sdi->priv))
674 /* If a probe group is specified, it must be a valid one. */
676 if (probe_group != &devc->analog_groups[0]
677 && probe_group != &devc->analog_groups[1]) {
678 sr_err("Invalid probe group specified.");
685 case SR_CONF_DEVICE_OPTIONS:
687 sr_err("No probe group specified.");
688 return SR_ERR_PROBE_GROUP;
690 if (probe_group == &devc->digital_group) {
691 *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32,
692 NULL, 0, sizeof(int32_t));
695 for (i = 0; i < 2; i++) {
696 if (probe_group == &devc->analog_groups[i]) {
697 *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32,
698 analog_hwcaps, ARRAY_SIZE(analog_hwcaps), sizeof(int32_t));
705 case SR_CONF_COUPLING:
707 sr_err("No probe group specified.");
708 return SR_ERR_PROBE_GROUP;
710 *data = g_variant_new_strv(coupling, ARRAY_SIZE(coupling));
714 /* Can't know this until we have the exact model. */
717 sr_err("No probe group specified.");
718 return SR_ERR_PROBE_GROUP;
720 g_variant_builder_init(&gvb, G_VARIANT_TYPE_ARRAY);
721 for (i = 0; i < devc->num_vdivs; i++) {
722 rational[0] = g_variant_new_uint64(devc->vdivs[i][0]);
723 rational[1] = g_variant_new_uint64(devc->vdivs[i][1]);
724 tuple = g_variant_new_tuple(rational, 2);
725 g_variant_builder_add_value(&gvb, tuple);
727 *data = g_variant_builder_end(&gvb);
729 case SR_CONF_TIMEBASE:
731 /* Can't know this until we have the exact model. */
733 g_variant_builder_init(&gvb, G_VARIANT_TYPE_ARRAY);
734 for (i = 0; i < devc->num_timebases; i++) {
735 rational[0] = g_variant_new_uint64(devc->timebases[i][0]);
736 rational[1] = g_variant_new_uint64(devc->timebases[i][1]);
737 tuple = g_variant_new_tuple(rational, 2);
738 g_variant_builder_add_value(&gvb, tuple);
740 *data = g_variant_builder_end(&gvb);
742 case SR_CONF_TRIGGER_SOURCE:
744 /* Can't know this until we have the exact model. */
746 *data = g_variant_new_strv(trigger_sources,
747 devc->model->has_digital ? ARRAY_SIZE(trigger_sources) : 4);
749 case SR_CONF_DATA_SOURCE:
751 /* Can't know this until we have the exact model. */
753 /* This needs tweaking by series/model! */
754 if (devc->model->series == RIGOL_DS2000)
755 *data = g_variant_new_strv(data_sources, ARRAY_SIZE(data_sources));
757 *data = g_variant_new_strv(data_sources, ARRAY_SIZE(data_sources) - 1);
766 static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
768 struct sr_scpi_dev_inst *scpi;
769 struct dev_context *devc;
770 struct sr_probe *probe;
774 if (sdi->status != SR_ST_ACTIVE)
775 return SR_ERR_DEV_CLOSED;
780 if (devc->data_source == DATA_SOURCE_LIVE) {
781 if (sr_scpi_send(sdi->conn, ":RUN") != SR_OK)
783 } else if (devc->data_source == DATA_SOURCE_MEMORY) {
784 if (devc->model->series != RIGOL_DS2000) {
785 sr_err("Data source 'Memory' not supported for this device");
788 } else if (devc->data_source == DATA_SOURCE_SEGMENTED) {
789 sr_err("Data source 'Segmented' not yet supported");
793 for (l = sdi->probes; l; l = l->next) {
795 sr_dbg("handling probe %s", probe->name);
796 if (probe->type == SR_PROBE_ANALOG) {
798 devc->enabled_analog_probes = g_slist_append(
799 devc->enabled_analog_probes, probe);
800 if (probe->enabled != devc->analog_channels[probe->index]) {
801 /* Enabled channel is currently disabled, or vice versa. */
802 sprintf(cmd, ":CHAN%d:DISP %s", probe->index + 1,
803 probe->enabled ? "ON" : "OFF");
804 if (sr_scpi_send(sdi->conn, cmd) != SR_OK)
807 } else if (probe->type == SR_PROBE_LOGIC) {
809 devc->enabled_digital_probes = g_slist_append(
810 devc->enabled_digital_probes, probe);
811 if (probe->enabled != devc->digital_channels[probe->index]) {
812 /* Enabled channel is currently disabled, or vice versa. */
813 sprintf(cmd, ":DIG%d:TURN %s", probe->index,
814 probe->enabled ? "ON" : "OFF");
815 if (sr_scpi_send(sdi->conn, cmd) != SR_OK)
820 if (!devc->enabled_analog_probes && !devc->enabled_digital_probes)
823 sr_scpi_source_add(scpi, G_IO_IN, 50, rigol_ds_receive, (void *)sdi);
825 /* Send header packet to the session bus. */
826 std_session_send_df_header(cb_data, LOG_PREFIX);
828 if (devc->model->protocol == PROTOCOL_LEGACY) {
829 /* Fetch the first frame. */
830 if (devc->enabled_analog_probes) {
831 devc->analog_frame_size = DS1000_ANALOG_LIVE_WAVEFORM_SIZE;
832 devc->channel_frame = devc->enabled_analog_probes->data;
833 if (sr_scpi_send(sdi->conn, ":WAV:DATA? CHAN%d",
834 devc->channel_frame->index + 1) != SR_OK)
837 devc->channel_frame = devc->enabled_digital_probes->data;
838 if (sr_scpi_send(sdi->conn, ":WAV:DATA? DIG") != SR_OK)
842 devc->num_frame_bytes = 0;
844 if (devc->enabled_analog_probes) {
845 if (devc->data_source == DATA_SOURCE_MEMORY)
847 if (g_slist_length(devc->enabled_analog_probes) == 1)
848 devc->analog_frame_size = DS2000_ANALOG_MEM_WAVEFORM_SIZE_1C;
850 devc->analog_frame_size = DS2000_ANALOG_MEM_WAVEFORM_SIZE_2C;
851 /* Apparently for the DS2000 the memory
852 * depth can only be set in Running state -
853 * this matches the behaviour of the UI. */
854 if (sr_scpi_send(sdi->conn, ":RUN") != SR_OK)
856 if (sr_scpi_send(sdi->conn, "ACQ:MDEP %d", devc->analog_frame_size) != SR_OK)
858 if (sr_scpi_send(sdi->conn, ":STOP") != SR_OK)
861 devc->analog_frame_size = DS2000_ANALOG_LIVE_WAVEFORM_SIZE;
862 devc->channel_frame = devc->enabled_analog_probes->data;
863 if (rigol_ds_capture_start(sdi) != SR_OK)
871 static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
873 struct dev_context *devc;
874 struct sr_scpi_dev_inst *scpi;
880 if (sdi->status != SR_ST_ACTIVE) {
881 sr_err("Device inactive, can't stop acquisition.");
885 g_slist_free(devc->enabled_analog_probes);
886 g_slist_free(devc->enabled_digital_probes);
887 devc->enabled_analog_probes = NULL;
888 devc->enabled_digital_probes = NULL;
890 sr_scpi_source_remove(scpi);
895 SR_PRIV struct sr_dev_driver rigol_ds_driver_info = {
897 .longname = "Rigol DS",
902 .dev_list = dev_list,
903 .dev_clear = dev_clear,
904 .config_get = config_get,
905 .config_set = config_set,
906 .config_list = config_list,
907 .dev_open = dev_open,
908 .dev_close = dev_close,
909 .dev_acquisition_start = dev_acquisition_start,
910 .dev_acquisition_stop = dev_acquisition_stop,