Uwe Hermann [Sat, 14 Sep 2013 18:28:40 +0000 (20:28 +0200)]
i2c: Drop unneeded 'addressing' option.
This (unimplemented so far) option is not needed at all, since the
decoder will be able to detect 7/10 bit slave addresses automatically,
the user doesn't have to specify slave address sizes.
Uwe Hermann [Fri, 13 Sep 2013 17:08:34 +0000 (19:08 +0200)]
i2c: Various fixes to make the PD suitable for GUIs.
The output format of the slave address is now a PD option. It can be
"shifted" or "unshifted", i.e. bit 0 (which contains a read/write
marker) is either shifted out or not, i.e., the slave address is
displayed as 8bit or 7bit number (or 11bit/10bit number for 10bit slave
addresses).
Data bytes (not address bytes) are always shown as 8bit values, of course.
Add annotation types for the individual I2C components such as
start conditions, stop conditions, ACK/NACK, address read/writes,
data read/writes and so on.
Uwe Hermann [Thu, 12 Sep 2013 19:19:55 +0000 (21:19 +0200)]
spi: Make CS# optional and use it if supplied.
The CS# pin is now optional, it can either be supplied to the PD or not.
If it _is_ supplied, reset the PD state every time it changes. This has
the effect that "incomplete" SPI frames and those where CS# is not
asserted are ignored and not decoded.
Uwe Hermann [Thu, 12 Sep 2013 07:40:40 +0000 (09:40 +0200)]
uart: Output data in separate RX and TX annotation types.
There is one annotation type for the RX side of the communication/data
output now, and another one for the TX side.
This allows GUIs to show them in two different traces, and/or show them in
the same trace but with different colors.
This also has the additional benefit that it is clear which databyte
belongs to which direction. Previously the annotations had to look like
"RX: 5F" or "TX: 11001011", but the "RX: " and "TX: " prefixes are now
no longer required, making the GUI traces (and CLI output too) much more
readable.
Uwe Hermann [Thu, 12 Sep 2013 07:32:28 +0000 (09:32 +0200)]
uart: Use same length for data output in all cases.
Until now you could get e.g. "d" or "df" as hex output from the UART PD.
This will now be a common-length "0D" and "DF". When all data byte
annotations are of the same lengths the readability in GUI traces is a lot
better. Also, hardcode hex characters to be upper-case (for now).
The same applies to oct ("021" instead of "21") and bin output
("00001001" instead of "1001").
Uwe Hermann [Thu, 12 Sep 2013 07:17:12 +0000 (09:17 +0200)]
uart: Put annotations into proper annotation types.
There are now extra annotation types for data, start/stop/parity bits and
for warnings (e.g. "invalid parity" or "frame error" or such).
This allows users to select which of the annotation types they want to
see (they can select one/multiple/all annotations as needed), and also
allows them to use different visual representation for the different
annotation types in GUIs (e.g. different colors for the blobs, different
fonts, rectangle/round/elliptic blobs, and so on; how the annotation
blobs are displayed is entirely up to the GUI and its configuration by
the user).
Uwe Hermann [Thu, 12 Sep 2013 07:01:52 +0000 (09:01 +0200)]
uart: Drop extensive protocol info (moved to wiki).
Move the full details of the protocol to the wiki, the docs in the PD
itself should only be a short description and/or a collection of notes
that could be useful for a user in a GUI (or CLI) to decide which
PD to select, which options to set how, what PDs to stack where, and so on.
The full protocol description (including photos, examples, ...) is here:
Uwe Hermann [Thu, 12 Sep 2013 06:31:59 +0000 (08:31 +0200)]
uart: Make data format selection a PD option.
Until now we (ab)used annotation types for outputting the same data
(numbers) in different formats (hex, ascii, binary, and so on).
Turn this into a proper PD option, since annotation types should rather be
used for different _types_ of annotations (e.g. "CRC", "Stop bit",
"Preamble", "Sequence counter", "Warnings", and similar things), not
different _formats_ for the same annotation type.
Old sigrok-cli invocation for hex output:
sigrok-cli ... -P uart:rx=0:tx=1 -A uart=hex
New:
sigrok-cli ... -P uart:rx=0:tx=1:format=hex
In GUIs there is now a new "Data format" option where the user can
select the output format for UART data (default is 'ascii').
Uwe Hermann [Thu, 12 Sep 2013 06:20:03 +0000 (08:20 +0200)]
uart: Use T for stop bit, P for parity bit.
The short(est) annotations for "Stop bit" and "Parity bit" have both
been "P" until now, which is confusing for users (on certain zoom levels
in GUIs). Use "T" for stop bits now instead.
Uwe Hermann [Wed, 11 Sep 2013 17:53:31 +0000 (19:53 +0200)]
uart: Don't prefix databyte output numbers.
Previously the output was 0x41 or 0o101 or 0b1000001, now it is 41 or
101 or 1000001. We drop these prefixes, since they decrease the readability
of the PD output (especially when displayed in GUIs) and are not needed
anyway since the user knowingly selected the number format before running
the respective PD.
Uwe Hermann [Wed, 11 Sep 2013 17:20:15 +0000 (19:20 +0200)]
uart: Fix corner-case that can occur with LA triggers.
Assume that the initial pin state is 1/high for the RX and TX lines.
This fixes the decode when an LA triggers on e.g. TX=low (the first
sample would be low in that case, so the falling edge for the start bit
would be missed by the decoder).
Uwe Hermann [Mon, 9 Sep 2013 19:48:42 +0000 (21:48 +0200)]
can: Fix annotation start/end samples.
With this change pretty much all CAN annotations that are currently
output should have the correct values, including single-bit and
multi-bit fields, standard and extended CAN frames, and so on.
Uwe Hermann [Sun, 8 Sep 2013 13:16:11 +0000 (15:16 +0200)]
i2c: Fix corner-case that can occur with LA triggers.
Until now the I2C PD was basically ignoring the very first sample, and
using that as the initial 'oldscl'/'oldsda' value.
However, if your logic analyzers trigger on, say, SDA=low that will
result in a file where the first sample is really important since it
is the one which the PD will need to know that there's a falling edge
on SDA.
Thus, assume both SCL and SDA are high/1 when the PD starts. This is
a good assumption since both pins have pullups on them in practice
and are thus high/1 when the bus is idle.
Later on we might want to have config options to let the PD assume
other states of SDA/SCL initially.
Uwe Hermann [Fri, 3 May 2013 12:49:21 +0000 (14:49 +0200)]
Main header is <libsigrokdecode/libsigrokdecode.h> now.
This matches the convention used in libsigrok. Potential other headers
might end up in libsigrokdecode/, but only libsigrokdecode.h is meant
to be #included by frontends directly.
Bert Vermeulen [Tue, 19 Mar 2013 00:47:53 +0000 (01:47 +0100)]
use GVariant for passing decoder options and probes
Decoder options are now exposed in struct srd_decoder, via a GSList
of the new struct srd_decoder_option. The 'def' field represents
the default value as set in the decoder, converted to GVariant. This
allows a library user to determine the type as well as default value.
Uwe Hermann [Sun, 17 Mar 2013 12:21:35 +0000 (13:21 +0100)]
configure.ac: Drop std-options, unneeded.
The automake 'std-options' option checks whether all installed tools
and scripts have a --help and --version CLI option. This check is not
needed for libsigrokdecode though, since it doesn't install any tools.
Uwe Hermann [Sun, 20 Jan 2013 23:50:14 +0000 (00:50 +0100)]
Update libtool version numbers for libsigrokdecode.
The last release of libsigrokdecode (package version number 0.1.0) had the
initial libtool version numbers (current:revision:age) of 0:0:0.
The upcoming release (0.1.1) is API-compatible with 0.1.0 and can be used
as drop-in replacement. Programs linked against 0.1.0 do not need to
be recompiled or relinked.
As per the libtool guidelines this release only increments the
libtool "revision" number. The new libtool version numbers
(current:revision:age) are thus 0:1:0.
See here for details:
http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
Uwe Hermann [Sun, 20 Jan 2013 20:46:42 +0000 (21:46 +0100)]
Minor autotools improvements.
- Don't use "foreign" option for automake. Without this automake will
perform some additional sanity checks e.g. on missing files. It will also
now add the usual INSTALL file which documents the configure options etc.
- Add AUTHORS file.
- Add 'check-news' automake option, which will abort 'make dist' if
the NEWS file doesn't list the current (to be released) package
version at the top (i.e., if we forget to update NEWS).
Uwe Hermann [Wed, 21 Nov 2012 21:43:02 +0000 (22:43 +0100)]
All PDs: Name the files pd.py consistently.
The Python module name is determined by the directory name (e.g. dcf77),
the *.py file names in that directory don't matter and can be kept
consistent.