Commit Graph

195 Commits

Author SHA1 Message Date
Uwe Hermann 9503583268 demo: Fix typos. 2014-03-30 18:06:54 +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 a68bf88e3a Replace channel_group.probes with channel_group.channels.
This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann 40fd0264f9 Replace some 'pg' with 'cg'.
(since 'probe groups' are now called 'channel groups')

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
Uwe Hermann a84f6ad389 Fix 'aquisition' typo in a few places. 2014-03-11 19:42:20 +01:00
Bert Vermeulen a66307424e Remove std_dev_clear() wrappers from drivers. 2014-02-26 21:37:18 +01:00
poljar (Damir Jelić) 9d156555a5 demo: Cast to double while calculating the pattern frequency.
Without the cast non integer frequencies weren't possible (e.g. with a sampling
frequency of 50Hz we would end up with a signal frequency of 2Hz instead of
2.5Hz). The result were signals which had an incorrect number of samples per
period.

BugLink: http://sigrok.org/bugzilla/show_bug.cgi?id=297
2014-01-28 21:23:54 +01:00
Bert Vermeulen fe90fbb782 demo: Require sample limit. 2014-01-25 21:20:29 +01:00
Bert Vermeulen 7f4975b440 demo: Keep separate counters for logic and analog sources.
Since they have different internal buffer sizes, their output counters
are not in sync. See bug 295.
2014-01-25 20:39:50 +01:00
Bert Vermeulen 2b36d6c64e demo: Cycle through all available patterns for default analog probes. 2014-01-21 18:25:50 +01:00
Bert Vermeulen 03aa381efb demo: Probe indexes should be unique, even if the types are different. 2014-01-21 18:19:57 +01:00
Bert Vermeulen 2438b737ae demo: Bring analog square wave amplitude into line with other patterns. 2014-01-17 14:36:00 +01:00
poljar (Damir Jelić) 9f54e0e84f demo: Add analog sawtooth pattern. 2014-01-17 14:30:28 +01:00
poljar (Damir Jelić) 091c962127 demo: Add triangle pattern. 2014-01-17 14:30:28 +01:00
poljar (Damir Jelić) 4374219bc8 demo: Implement sine wave pattern.
This adds sine wave generation capabilities for the analog channels in the demo
driver. The frequency of the sine wave depends on the configured sample rate of
the demo device. The frequency of the sine wave is always 20 times smaller than
the sample rate, in other words we always have 20 samples per period.
2014-01-17 14:30:28 +01:00
Bert Vermeulen 2388ae860c demo: Properly handle logic vs. analog when setting the pattern. 2014-01-12 23:31:23 +01:00
Bert Vermeulen 7a1da33198 demo: Split supported device options by probe group. 2014-01-12 22:36:39 +01:00
Bert Vermeulen 8b2d41edb3 demo: Analog probe support. 2013-12-29 10:58:56 +01:00
Bert Vermeulen c07f60e73d demo: User-configurable number of probes.
The sigrok and incremental patterns repeat every 8 probes, shifted by
one probe.
2013-12-29 10:58:56 +01:00
Martin Ling 3544f848e0 Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
Bert Vermeulen 61c39f54bb demo: Code cleanup. 2013-12-22 23:47:50 +01:00
Martin Ling 8f996b8948 probe_groups: API changes required to implement probe groups. 2013-11-08 01:03:16 +01:00
Uwe Hermann 1c2d542df2 demo: Use std_dev_clear(). 2013-06-02 16:57:07 +02:00
Uwe Hermann 3b412e3a30 s/clear_instances/dev_clear/.
Consistently use the same name for the dev_clear() API callback
everywhere.
2013-06-02 16:56:41 +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 6078d2c996 Use consistent API callback function names.
This now matches what the 'new-driver' tool generates.
2013-05-10 20:01:37 +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
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 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 bd6fbf628a drivers: return SR_ERR_NA on unsupported config key
Fixes bug 89.
2013-04-16 11:00:55 +02:00
Uwe Hermann e45ad6e24f demo: Fix compiler warning, cosmetics. 2013-04-15 12:27:55 +02:00
Joel Holdsworth 2150a69b76 demo: Unref the IO channel when it is no longer used 2013-04-14 23:39:15 +02:00
Joel Holdsworth ed20a42803 demo: Free dev_contexts 2013-04-14 23:39:15 +02:00
Joel Holdsworth a76842947f demo: Moved demo configuration variables into dev_context 2013-04-14 23:39:15 +02:00
Joel Holdsworth 33ef757383 demo: Keep a pointer to dev_context in sr_dev_inst and vice-versa 2013-04-14 23:39:15 +02:00
Joel Holdsworth e053204700 demo: Only one GIOChannel is needed 2013-04-14 23:39:15 +02:00
Joel Holdsworth bbd7ef0f18 demo: Fixed glitching in increment signal 2013-04-14 23:39:15 +02:00
Bert Vermeulen d00088ca6d demo: Adjust to GVariant-based sr_config_* functions 2013-04-11 18:32:06 +02:00
Bert Vermeulen 2474d87e8c demo: sync get/set options 2013-03-03 21:21:08 +01:00
Uwe Hermann 3e9b7f9c77 Rename session_dev_id to cb_data everywhere.
We use 'cb_data' in all drivers these days, make the few remaining ones
that use 'session_dev_id' consistent.
2013-02-07 11:26:02 +01:00
Uwe Hermann 4afdfd4628 Add and use std_session_send_df_header().
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.
2013-02-07 10:46:28 +01:00