Commit Graph

82 Commits

Author SHA1 Message Date
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 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
Daniel Elstner 4f2dad42f4 input/vcd: Remove debug output from inner loops.
(parse_contents): Do not call sr_dbg() on every signal change.
This would be excessive even for sr_spew().
(read_until): Do not call ftell() just to be able to show some
number in a debug message later on.
2014-02-05 01:17:52 +01:00
Daniel Elstner cd1b0e8f79 input/vcd: Avoid truncation of shift to 32 bits.
(parse_contents): Cast constant 1 to uint64_t before shifting left.
Also fix whitespace errors.
2014-02-05 01:17:43 +01:00
Uwe Hermann b95dd7619d log prefixes: Cosmetics, consistency fixes, typo fixes. 2013-12-27 13:17:20 +01:00
Martin Ling 3544f848e0 Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
Bert Vermeulen 6c57446d41 Don't accept over 64 probes.
The code is limited to 64 probes for now, so don't accept setting
the probe limit to higher than that.

See bug 194.
2013-11-26 22:23:38 +01:00
Bert Vermeulen e4c8a4d7cb input/vcd: Coding style fixes. 2013-11-26 22:23:37 +01:00
Marc Schink 4a35548bbe Initial Comma-separated values (CSV) input support. 2013-10-30 14:43:56 +01: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
Martin Ling db9679afc9 vcd input: Use a GSList rather than fixed size array of probes. 2013-04-27 15:49:49 +02:00
Uwe Hermann 50985c2019 GPL headers: Use correct project name. 2013-04-23 22:24:30 +02:00
Bert Vermeulen e48a546292 input/vcd: deprecate struct sr_rational 2013-04-11 18:32:07 +02:00
Bert Vermeulen ec4063b83c input/output modules: Adjust to GVariant-based sr_config_* functions 2013-04-11 18:32:06 +02:00
Bert Vermeulen 13d8e03c4f Bump copyright year 2013-04-11 18:32:06 +02:00
Uwe Hermann 3ebce226a2 s/sr_config_make/sr_config_new/.
This matches the naming of other/similar functions better.
2013-03-23 14:16:00 +01:00
Uwe Hermann 8368734386 doxygen: Add more input format docs.
This is largely taken from the respective wiki page (with some updates
and improvements), which will be removed in favor of the doxygen docs.
2013-02-24 14:31:15 +01:00
Bert Vermeulen 1d36b4d27f input: new WAV file module 2013-02-21 15:21:20 +01:00
Bert Vermeulen 543d45c581 input: feed the filename to the module's init() function
This is essential if a format contains e.g. the number of probes; the
init() function needs to initialize the sr_dev_inst struct, but needs
access to the file to properly add the probes to it.
2013-02-21 15:21:20 +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
Bert Vermeulen 1953564a96 Rename SR_HWOPT_* and SR_HWCAP_* to SR_CONF_* 2013-01-21 23:32:50 +01:00
Bert Vermeulen 2df1e81970 Use new SR_DF_META packet.
Since input modules determine a samplerate by reading from their
file format (or having it overridden with an option), they need
to pass this up to the frontend.
2013-01-21 23:32:49 +01:00
Petteri Aimonen 6b7ace4832 Add compress option to input/vcd. 2012-11-22 23:15:37 +01:00
Petteri Aimonen 8be8746951 Improve compatibility with various kinds of VCD files. 2012-11-21 16:39:16 +01:00
Petteri Aimonen 0157808d74 Add downsample and skip parameters to input/vcd. 2012-11-21 16:39:16 +01:00
Petteri Aimonen 61a429c963 VCD data parsing 2012-11-20 22:24:17 +02:00
Petteri Aimonen 99eaa20695 Beginnings of VCD input module.
File header parsing implemented.
Data parsing not yet implemented.
2012-11-20 21:03:06 +02:00
Uwe Hermann 8e7f1cfd99 Input modules: Use message logging helpers. 2012-11-11 18:14:17 +01:00
Uwe Hermann 64d33dc28e All drivers: Drop unneeded comments. 2012-11-11 18:09:11 +01:00
Uwe Hermann 393fb9cb18 Doxygen: Add @file items for the relevant files.
These short descriptions are shown in the "Files" section of the
Doxygen output.
2012-10-22 11:56:18 +02:00
Uwe Hermann 7b870c38e3 Doxygen: Initial groups and topic short descriptions. 2012-10-22 11:56:18 +02:00
Uwe Hermann b4bd70889f Doxygen: Mark non-public stuff for exclusion.
- /** @private */ can be used for functions, and /** @cond PRIVATE */ and
   /** @endcond */ for variables or #defines.

 - Document the above in HACKING.
2012-10-22 11:56:17 +02:00
Bert Vermeulen 5c3c1241d2 sr: change input/output modules to use struct sr_dev_inst * 2012-08-03 11:27:31 +02:00
Bert Vermeulen 0d1297a291 sr: always use uint64_t for samplerate 2012-07-29 02:45:40 +02:00
Tomaž Šolc c506a6a688 Allow setting samplerate when reading binary files
I had a binary file that I needed to decode using UART decoder. UART
decoder needs to know the sample rate for the data, but currently it's
not possible to pass parameters to input formats and so the "binary"
file format always sets the samplerate to 0.

This patch adds the possibility to append a colon-separated list of
key=value options to the -I argument, in the same way -d supports it.
Also, it makes the "binary" format support the "samplerate" option.

I included the GHashTable containing input format options directly in
the sr_input struct. I'm not sure if that's the right way to do it. I
saw that -d uses a much more elaborate system with device capabilities
and typed options, but that seemed like an overkill for input formats.
2012-07-29 02:16:17 +02:00
Bert Vermeulen 45c59c8bdd sr: moved sigrok.h so libsigrok/libsigrok.h
All frontends will have to include <libsigrok/libsigrok.h> from now on.
This header includes proto.h and version.h, both installed from the
distribution into $INCLUDE/libsigrok/ as well.

The only dynamically changed header is now version.h, which has both
libsigrok and libtool compile-time versions in it.
2012-07-05 01:17:28 +02:00
Bert Vermeulen f366e86c68 sr: change all drivers to use SR_DF_META_LOGIC 2012-05-30 23:55:36 +02:00
Uwe Hermann 36423d04e5 sr: input/chronovu_la8.c: Add missing #include.
This fixes a compiler warning.
2012-05-30 02:27:30 +02:00
Uwe Hermann 3217b03205 sr: la8 in: Files must be exactly 8388613 bytes.
All ChronoVu LA8 files (*.kdt extension usually) are exactly 8388613
bytes in size (8MB + 5 bytes). Check this, when trying to autodetect the
file format, to reduce the likelihood of 'chronovu-la8' being
autodetected on all binary files (instead of 'binary').
2012-05-29 20:25:08 +02:00
Uwe Hermann 31ccebc492 sr: s/sr_session_bus/sr_session_send/. 2012-03-01 23:49:25 +01:00
Bert Vermeulen 2285cf9bc5 sr: code cleanup 2012-02-28 17:47:02 +01:00
Uwe Hermann bb7ef79377 sr/cli/gtk/qt: s/device/dev/ in many places.
Also, a few s/instance/inst/ occurences.
2012-02-17 23:47:00 +01:00
Uwe Hermann 44dae53925 sr: Random cosmetics, fix/amend Doxygen comments. 2012-02-17 22:40:51 +01:00
Uwe Hermann 7b48d6e104 sr: Prefix log messages with subsystem string. 2012-02-17 22:40:51 +01:00
Uwe Hermann e0c25ac99c sr: Add missing #include, fixes warning. 2012-02-13 19:49:09 +01:00
Bert Vermeulen c73d2ea421 sr: adjust copyright year 2012-02-13 14:31:51 +01:00
Bert Vermeulen 031685005b sr: rename all sr_device_* functions to sr_dev_* 2012-02-13 14:00:47 +01:00