Also, consistently use 'ch' for channel variables. This matches how we
consistently use sdi, devc, and so on all over the code-base.
This fixes parts of bug #259.
The name 'probe' (and thus 'probe group') is a relic from the times when
sigrok was mostly about logic analyzers. Nowadays we support a lot more
device types where 'probe' is not really a good term and 'channel' is
much better suited.
This fixes parts of bug #259.
The maximum sample size that can be set on a device is now published
by sr_config_list(SR_CONF_LIMIT_SAMPLES). This returns a tuple of
uint64_t representing minimum and maximum number of samples.
SR_CONF_PATTERN_MODE was not handled in config_list(), yielding
non-working OLS support in PulseView (due to an assert), and a missing
pattern list in sigrok-cli's --show output.
This fixes bug #184.
The scan() function was opening the port in non-blocking mode, the dev_open()
function however was not using the SERIAL_NONBLOCK flag. This led to hangs
in certain situations.
This fixes the OLS e.g. on NetBSD.
Allow channel groups to be swapped. This is useful
for demux at 200mhz with the unbuffered channels.
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
The single sample buffer, up to 4 bytes long, was not getting initialized
on (every) acquisition start, only after the first full sample was in.
This caused the first sample to potentially hold garbage.
ols allows both external and internal test patterns at ~20khz
which are helpful for unit tests and demos.
pattern=internal -> route pattern internally to all 32 pins
(input otherwise disabled)
pattern=external -> generates pattern on unbuffered pins 16:31
(which can be looped back to the buffered pins 0:15)
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
The per-driver API calls no longer have a hw_ prefix (e.g. hw_init()
became init() and so on), so drop the 'hw_' from the std versions
for those API callbacks too.
This off-by-one was clobbering the stack since introduced in a803c0db4d.
However it only set one bit, and that generally appears to have been set
already, so this rarely affected anything. But when it did, it affected
a pointer, causing a segfault.
This is a small helper function which sends the SR_DF_HEADER packet that
drivers usually emit in their hw_dev_acquisition_start() API callback.
It simplifies and shortens the hw_dev_acquisition_start() functions
quite a bit.
It also simplifies the input modules which send an SR_DF_HEADER packet, too.
This patch also automatically removes some unneeded malloc/free in some
drivers for the 'packet' and 'header' structs used for SR_DF_HEADER.