Commit Graph

211 Commits

Author SHA1 Message Date
Bert Vermeulen 91fd0f7246 ols: Use new trigger API. 2014-05-28 00:21:45 +02:00
Bert Vermeulen 1e1dac0c07 ols: Allow disabling all channels.
This fixed bug 316.
2014-04-21 14:46:49 +02:00
Uwe Hermann 3f239f0803 Rename various *PROBE* macros to *CHANNEL*.
This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann 56d0d24535 Rename sr_probe_new() to sr_channel_new().
This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann ba7dd8bbb8 Replace 'probe' with 'channel' in most places.
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.
2014-03-25 20:58:54 +01:00
Uwe Hermann 91aea754aa Rename 'struct sr_probe' to 'struct sr_channel' everywhere.
This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann 53b4680fce Consistently use 'cg' for channel group variables.
This matches how we consistently use sdi, devc, and so on all over
the code-base.

This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann 660e398fe9 Replace 'probe group' with 'channel group' everywhere.
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.
2014-03-25 20:58:54 +01:00
Uwe Hermann 67bd805523 Switch to a non-recursive automake setup.
Instead of >= 44 Makefile.am's we now only have one top-level
Makefile.am, and use the 'subdir-objects' automake option to
handle the build via non-recursive (auto)make.

This has the advantage of fewer (boilerplate or other) files and less
clutter in general, as well as performance advantages since the new
setup can build many files in parallel (with 'make -j'), not only 2 or 3
files within the same (e.g. hardware/xxxx/* subdirectory) and also since
we no longer need to build intermediate libtool helper libs per subdirectory.

A quick, non-scientific test build on a quad-core laptop with 'make -j 4'
yields a build time reduction from 35s to 19s.

All autotools features that worked before are still intact without any
regressions, including the Make targets 'install', 'uninstall', 'check',
'dist', 'clean', 'distclean' and so on, as well as all the usual portability
handling (build works on any OS, with any Make implementation such as
GNU Make or BSD Make, with any shell such as sh/ksh/zsh/bash/dash, etc. etc.)
and features such as out-of-tree build support, cross-compile support,
testsuite support (also with colored output), "silent make rules", etc. etc.
2014-03-20 13:10:05 +01:00
Bert Vermeulen a66307424e Remove std_dev_clear() wrappers from drivers. 2014-02-26 21:37:18 +01:00
Bert Vermeulen 625763e2c2 ols: Code cleanup and more debug output. 2014-01-30 11:58:07 +01:00
Bert Vermeulen 016e72f30e ols: Fix endianness problems in protocol. 2014-01-29 15:34:24 +01:00
Bert Vermeulen 32f09bfd9e ols: Don't reduce sample count just because it's not a multiple of 4. 2014-01-23 01:09:16 +01:00
Bert Vermeulen 6d16fdfb13 ols: Add option to turn test patterns off again. 2014-01-20 18:16:25 +01:00
Bert Vermeulen f0de2dd0fa Remove SR_CONF_MAX_UNCOMPRESSED_SAMPLES again.
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.
2014-01-19 17:18:59 +01:00
Bert Vermeulen 7730e4f002 Add support for SR_CONF_MAX_UNCOMPRESSED_SAMPLES. 2014-01-09 13:08:32 +01:00
Martin Ling 264c99eda2 ols: Use serial source management wrappers. 2013-12-30 14:19:39 +01:00
Martin Ling 9f5d4c3cc3 ols: Mark all serial calls as blocking or nonblocking. 2013-12-30 14:19:39 +01:00
Martin Ling 3544f848e0 Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
Bert Vermeulen 854434de0b Use std_serial_dev_open(). 2013-12-07 21:54:08 +01:00
Martin Ling bf72f64999 ols: Get fd from sp_get_port_handle() rather than serial struct. 2013-12-07 19:43:47 +00:00
Martin Ling bf2c987fde Use std_serial_dev_close() to replace matching dev_close functions. 2013-12-07 19:43:47 +00:00
Martin Ling 7faa3e8821 Route sr_source_remove for all serial devices through a wrapper. 2013-12-07 19:43:47 +00:00
Martin Ling abc4b3356d Route sr_source_add for all serial devices through a serial_source_add wrapper. 2013-12-07 19:43:47 +00:00
Uwe Hermann 7c07a1783e ols: config_list(): Handle SR_CONF_PATTERN_MODE.
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.
2013-11-22 22:31:08 +01:00
Uwe Hermann 4403c39fe4 ols: Always open serial port in nonblocking mode.
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.
2013-11-19 23:22:46 +01:00
Martin Ling 8f996b8948 probe_groups: API changes required to implement probe groups. 2013-11-08 01:03:16 +01:00
Matt Ranostay 6ebe003985 ols: fixed demux mode disable noise filter
Demux flag wasn't getting set off if one non-demux sample was ran
beforehand.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-09-07 20:17:16 +02:00
Matt Ranostay 6a53bde671 ols: Moved FLAG_FILTER to demux check
Demux mode was having filter mode set which it doesn't
support per FPGA demon core docs.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-09-06 11:42:25 +02:00
Matt Ranostay b1de040700 ols: fixed channel limit check
For demux mode we half the channels. Previous check method broke
the OLS randomly and but it in a bad state.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-08-30 13:58:36 +02:00
Matt Ranostay f51acd69d7 ols: combine demux samples
demux mode allows DDR sampling which disables group 2 & 3
and thus samples group 0 & 1 to sample on rising and falling of
the clock.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-08-28 10:21:59 +02:00
Matt Ranostay 7b0a57fd1c ols: add swap channels feature
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>
2013-08-28 10:21:59 +02:00
Matt Ranostay de52409982 ols: Display noise filter flag
Show if noise filter is on. This is important to be
sure is off for demux mode.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-08-28 10:21:59 +02:00
Bert Vermeulen 00d04d3b0e ols: Fix RLE count handling
The high bit of the sample, denoting this is a count, was not getting
properly cleared. This resulted in an inevitably negative count, and
corruption of the sample buffer before it was transferred to the
frontend.
2013-08-27 00:33:20 +02:00
Bert Vermeulen abb39e6b8c ols: Properly initialize entire single-sample buffer before start
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.
2013-08-26 23:42:09 +02:00
Matt Ranostay eb1b610b12 ols: add external clock support
Add external clock support that allows you to use the tracing
targets bus clock line for sampling.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-08-26 10:28:45 +02:00
Matt Ranostay 967760a893 ols: add test mode support
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>
2013-08-26 09:52:24 +02:00
Matt Ranostay 503133bb5f ols: fixed parallel stage triggers
Stage count was always getting incremented one more than
actual stages, and this caused a extra stage with zero'ed data
probe lines to have the start bit field.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
2013-08-26 09:48:41 +02:00
Bert Vermeulen faf720246a ols: Workaround for mac os X stray events 2013-08-01 19:48:07 +02:00
Uwe Hermann eea49cf10d ols/link-mso19: Consistency fixes.
Use the same setup/ordering/naming for the cleanup/dev_clear functions
as all other drivers do.
2013-06-02 17:03:40 +02:00
Uwe Hermann f6beaac55c std: Drop hw_ from function names.
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.
2013-06-02 16:46:18 +02:00
Uwe Hermann decfe89d4e Drop some lines that are no longer needed. 2013-05-10 18:30:32 +02:00
Uwe Hermann 2a052cc4d6 Use consistent naming for internal libtool helper libs.
This now also matches what the 'new-driver' tool generates.
2013-05-10 17:44:01 +02:00
Uwe Hermann 9e165e742f Use consistent HW_ name prefixes everywhere.
Older drivers used LA_* previously, we now use HW_* everywhere though.
2013-05-10 17:18:42 +02:00
Bert Vermeulen 03f4de8cf2 ols: Code cleanup
This also fixes a memory leak.
2013-05-06 00:42:18 +02:00
Uwe Hermann 29a27196a1 s/DRIVER_LOG_DOMAIN/LOG_PREFIX/.
This is more correct anyway, and also a bit shorter and more readable.
2013-05-03 21:59:32 +02:00
Bert Vermeulen 0f75d6f5a9 ols: Don't close serial port after acquisition is done 2013-04-29 12:39:26 +02:00
Bert Vermeulen e73ffd4238 Enforce open device before config_set()/dev_acquisition_start() 2013-04-24 22:03:50 +02:00
Uwe Hermann 50985c2019 GPL headers: Use correct project name. 2013-04-23 22:24:30 +02:00
Bert Vermeulen 459a0f2623 ols: Use sr_dev_inst to store connection handle 2013-04-22 13:40:40 +02:00