]> sigrok.org Git - libsigrok.git/commit - src/hardware/asix-sigma/api.c
asix-sigma: store "limit samples" value, re-determine "limit msecs" period
authorGerhard Sittig <redacted>
Sun, 16 Oct 2016 16:25:20 +0000 (18:25 +0200)
committerUwe Hermann <redacted>
Mon, 17 Oct 2016 00:05:21 +0000 (02:05 +0200)
commit2f7e529ce64c45508adf616b4b48a7a154aa7798
tree98a9e9adb146ff8d212da546418b0fd86d276d06
parent4154a516de818ace3aabfe5e44cf4c81986074e7
asix-sigma: store "limit samples" value, re-determine "limit msecs" period

The driver internally implements the "limit samples" feature by means of
the "limit sample period" approach. Determination of the corresponding
period of time for captures depends on the sample rate as well as the
maximum sample count, and thus needs to be re-done when either setting
changes.

Introduce a "limit_samples" variable so that the value is available when
needed later. As a byproduct the parameter can be retrieved now (get).

Add comments to the sigma_set_samplerate() routine's sections, since
quite a bit is happening there, and interacts with other locations.

Signed-off-by: Gerhard Sittig <redacted>
src/hardware/asix-sigma/api.c
src/hardware/asix-sigma/protocol.c
src/hardware/asix-sigma/protocol.h