]> sigrok.org Git - libsigrok.git/commit
asix-sigma: download sample data upon user initiated stop, too
authorGerhard Sittig <redacted>
Sat, 29 Jul 2017 14:09:36 +0000 (16:09 +0200)
committerUwe Hermann <redacted>
Fri, 11 Aug 2017 16:52:23 +0000 (18:52 +0200)
commitdde0175d19fe443cf60c3089196364db17cfaa62
treebe10e99c61c71049f7ade3dff08e66b985fc5134
parent379e95c587e1d76eb5d6d1a144b938e6a4916b1f
asix-sigma: download sample data upon user initiated stop, too

When the acquisition was stopped before a configured limit was reached,
no sample data was retrieved. This is because the api.c stop routine did
unregister the receive callback.

Pass the stop request to the receive routine instead when stop is called
while the acquisition is still running. Have sample data downloaded very
much like it's done for reached limits, and existing logic will run the
stop routine again after state was advanced to "idle".

Extend the 'state' tracking while we are here, mark sample download as
well (that was omitted in the previous implementation). Though the
omission was non-fatal. Move the release of 'dram_line' to some earlier
location (as soon as the resource is not needed any longer), before some
rather complex calls to other routines will execute.

Reported-By: Michael Kaplan <redacted>
src/hardware/asix-sigma/api.c
src/hardware/asix-sigma/protocol.c
src/hardware/asix-sigma/protocol.h