]> sigrok.org Git - libsigrok.git/commitdiff
fx2lafw: Call dslogic_get_number_of_transfers into fx2lafw_get_number_of_transfers
authorJoel Holdsworth <redacted>
Thu, 8 Jun 2017 21:25:33 +0000 (15:25 -0600)
committerUwe Hermann <redacted>
Mon, 19 Jun 2017 22:18:16 +0000 (00:18 +0200)
src/hardware/fx2lafw/api.c
src/hardware/fx2lafw/protocol.c

index c3a819b459121966e9e7715d23358e439aff655e..71aabd9ffa160539fda10136ec2cd5478271db00 100644 (file)
@@ -860,9 +860,6 @@ static int start_transfers(const struct sr_dev_inst *sdi)
 
        num_transfers = fx2lafw_get_number_of_transfers(devc);
 
-       //if (devc->dslogic)
-       //      num_transfers = dslogic_get_number_of_transfers(devc);
-
        if (devc->dslogic) {
                if (devc->cur_samplerate == SR_MHZ(100))
                        num_transfers = 16;
index e2112af13abc6d96a0f1893f60451d0e04e22d72..7e2df5ad9e0ed9b11ee9c0f586b7a19b9b1bd8fe 100644 (file)
@@ -593,6 +593,9 @@ SR_PRIV unsigned int fx2lafw_get_number_of_transfers(struct dev_context *devc)
 {
        unsigned int n;
 
+       if (devc->dslogic)
+               return dslogic_get_number_of_transfers(devc);
+
        /* Total buffer size should be able to hold about 500ms of data. */
        n = (500 * to_bytes_per_ms(devc->cur_samplerate) /
                fx2lafw_get_buffer_size(devc));