]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/asix-sigma/api.c
asix-sigma: prepare configuration re-use across sigrok sessions
[libsigrok.git] / src / hardware / asix-sigma / api.c
index 81a5df9380904c48752d79e14d45bec2ae89a99f..d8f9bf27c49206bfaa2522005e5c405d3434f4a9 100644 (file)
@@ -252,9 +252,8 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
                devc->capture_ratio = 50;
                devc->use_triggers = 0;
 
-               /* TODO Retrieve some of this state from hardware? */
-               devc->firmware_idx = SIGMA_FW_NONE;
-               devc->clock.samplerate = sigma_get_samplerate(sdi);
+               /* Get current hardware configuration (or use defaults). */
+               (void)sigma_fetch_hw_config(sdi);
        }
        libusb_free_device_list(devlist, 1);
        g_slist_free_full(conn_devices, (GDestroyNotify)sr_usb_dev_inst_free);