From: Joel Holdsworth Date: Thu, 8 Jun 2017 21:25:33 +0000 (-0600) Subject: fx2lafw: Call dslogic_get_number_of_transfers into fx2lafw_get_number_of_transfers X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=9082b5ccf790c581153d493a1f15ac24be09a70c;p=libsigrok.git fx2lafw: Call dslogic_get_number_of_transfers into fx2lafw_get_number_of_transfers --- diff --git a/src/hardware/fx2lafw/api.c b/src/hardware/fx2lafw/api.c index c3a819b4..71aabd9f 100644 --- a/src/hardware/fx2lafw/api.c +++ b/src/hardware/fx2lafw/api.c @@ -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; diff --git a/src/hardware/fx2lafw/protocol.c b/src/hardware/fx2lafw/protocol.c index e2112af1..7e2df5ad 100644 --- a/src/hardware/fx2lafw/protocol.c +++ b/src/hardware/fx2lafw/protocol.c @@ -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));