]> sigrok.org Git - libsigrok.git/commit - src/hardware/asix-sigma/api.c
asix-sigma: complete and extend capture mode supervision
authorGerhard Sittig <redacted>
Sun, 31 May 2020 16:38:14 +0000 (18:38 +0200)
committerGerhard Sittig <redacted>
Sun, 31 May 2020 21:53:42 +0000 (23:53 +0200)
commitf14e6f7e1aab7f2ccfdffe6540d162f292c00a2c
treebabfb52b6ed996ff556f9f88655cf8935d28a9d6
parentdebe1ff66d6567f0733e74fefc185437e67a7ce2
asix-sigma: complete and extend capture mode supervision

Parse trigger specs early when acquisition starts, timeout calculation
needs to reflect on it. Either immediately start an acquisition timeout
for trigger-less configurations. Or prepare a timeout which spans the
post-trigger period, but only start its active period when the trigger
match was detected by the device's hardware.

Extend mode tracking during acquisition to handle other special cases.
Terminate acquisition when the user specified sample count limit exceeds
the hardware capacity, or when no limits were specified and the device's
memory is exhausted.

There is a slight inaccuracy in this approach, but the implementation
fails on the safe side. When both user specified limits and triggers are
involved, then at least the user specified time or sample count span is
provided. Usually more data is sent to the session feed, and all of the
requested period is covered. This is because of the software poll period
and the potential to start the timeout slightly late. As well as having
added some slack for hardware pipelines in the timeout calculation.
src/hardware/asix-sigma/api.c
src/hardware/asix-sigma/protocol.c
src/hardware/asix-sigma/protocol.h