]> sigrok.org Git - libsigrok.git/commit - src/hardware/demo/api.c
demo: Mask out logic data for disabled channels in datafeed packets
authorGerhard Sittig <redacted>
Tue, 20 Jun 2017 19:04:37 +0000 (21:04 +0200)
committerUwe Hermann <redacted>
Sat, 24 Jun 2017 14:33:50 +0000 (16:33 +0200)
commit4a465510fb2a427089f3460da599a4dda6e4a146
tree47d3d2cfb48772c240b0d79f8f3c2d4d7c9e7890
parent1b7b72d49e5ce19593ca4b2a793bec441b4cdea4
demo: Mask out logic data for disabled channels in datafeed packets

The previous implementation used to provide datafeed packets which
contain logic data in positions that correspond to disabled channels.

Do mask out logic data of disabled channels in the memory image before
it is sent to the session's datafeed. This implementation works fine for
those situations where either all logic channels are enabled (default
configuration) or when only the upper channels get disabled (which can
be considered a typical use case).

For those configurations where enabled channels follow disabled channels
(i.e. setups with gaps in the sequence of enabled channels) behaviour
will be unexpected: Neither is the mask adjusted to contain gaps, nor
will enabled channels get mapped to result in a dense representation.
The respective code paths are marked with TODO comments.

Add a comment to discuss a non-obvious generator call for analog data in
the acquisition start routine, while we are here.
src/hardware/demo/api.c
src/hardware/demo/protocol.c
src/hardware/demo/protocol.h