Petteri Aimonen [Sun, 15 Feb 2015 17:08:36 +0000 (19:08 +0200)]
Improve uart decoder sample positions at high data rates.
At 3 samples per bit, the uart decoder took the value at the last sample
instead of the middle one. Improve calculations so that sampling is more
accurate at odd number of samples per bit.
Reworked in the algorithm:
- Fixed the polarity setting
- Taken in consideration the first transition
- Using the 'None' state instead of -1 and 0 value
- Simplify the algorithm and remove useless branches and variables
- Avoid re-calculating the same thing more than once
- Renamed a few variables for a better understanding
- Duty cycle precision changed to floating value
Otherwise:
- Added a meta OUTPUT for the duty cycle average
- Renamed the polarity option:
'polarity', 'active low/high' are well-understood terms.
- Added comments
Jens Steinhauser [Sat, 18 Oct 2014 09:31:16 +0000 (11:31 +0200)]
spi: Tell stacked decoders about missing CS# signal.
This could previously be detected by the absence of a CS-CHANGE packet
before the first data packet, but it makes the stacked decoder simpler
if it is told directly.
Uwe Hermann [Sat, 16 Aug 2014 16:43:51 +0000 (18:43 +0200)]
configure.ac: Use AM_CFLAGS instead of CFLAGS.
CFLAGS, CPPFLAGS, LDFLAGS and so on are so-called "user variables" and
are meant for users of the package to use/override. The package itself
should not set or modify them in any way. Instead, the "shadow variables"
such as AM_CFLAGS, AM_CPPFLAGS, AM_LDFLAGS and so on, can be modified by
the package.
Uwe Hermann [Tue, 15 Jul 2014 20:49:43 +0000 (22:49 +0200)]
All PDs: Minor whitespace and consistency fixes.
- No newlines at the end of files.
- No trailing ';' characters.
- Comparison with None: Use 'is None' or 'is not None'.
- Comparison with True/False: Use 'if cond:' or 'if not cond:'.
- Various minor whitespace fixes.
For options which only have a limited set of valid values, we don't need
to check (in the PD) whether a valid value was supplied, since the backend
can do that for us.
Uwe Hermann [Tue, 8 Jul 2014 19:21:03 +0000 (21:21 +0200)]
All PDs: Drop unneeded exceptions.
In all current PDs it is not necessary to raise an exception upon
invalid states (of the PD's state machine), since we can guarantee that
no such invalid state can ever be reached in these PDs.
Marcus Comstedt [Sun, 29 Jun 2014 09:38:50 +0000 (11:38 +0200)]
runtc: Fix incorrect include directive
runtc.c used to try to include "../config.h". This only works when
building in the source tree, otherwise there is no config.h in the
parent directory of runtc.c. However, the explicit path is
unnecessary since the build directory (whether the same as the source
directory or not) will always be added to the include path.
Marcus Comstedt [Sun, 6 Jul 2014 23:36:22 +0000 (01:36 +0200)]
srd_decoder_load_all_path: Support zipimport paths
srd_decoder_load() works perfectly with decoders stored inside zip files.
However, srd_decoder_load_all{_path,}() did not, because it assumed that
normal directory listings can be used to enumerate decoders, which is not
the case for zipped decoders. Fix this by providing a fallback based on
the zipimporter Python class.
Bert Vermeulen [Mon, 23 Jun 2014 17:49:47 +0000 (19:49 +0200)]
pdtest/runtc: Support for output type 'exception'.
The match value should be the name of the exception thrown, e.g.
AttributeError, IndexError or even a custom exception defined in
the protocol decoder, such as SamplerateError.
Kumar Abhishek [Fri, 9 May 2014 21:32:05 +0000 (04:32 +0700)]
libsigrokdecode: Fix make -j issue with build_runtc
The build of runtc caused issues with make -j as runtc
was attempted to be linked with libsigrokdecode before
libsigrokdecode was linked. Using LDADD to insert
libsigrokdecode ensures that it links before runtc,
ensuring the build completes correctly.
Abhishek Kumar [Thu, 8 May 2014 23:05:00 +0000 (06:05 +0700)]
Add python as a pkg-config dependency
The current libsigrokdecode build passes the python
CPPFLAGS and LDFLAGS directly into libsigrokdecode.pc.in.
This leads to issues while cross-compiling as while using
PKG_CONFIG_SYSROOT_DIR, there is a chance of the prefix
being duplicated. We now, while detecting the installation
of python (cross or normal), add a dependency for the
module name in the pkgconfig file (from configure.ac).