2 months agosdcard_sd: Automatically generate token field annotation classes. master
Uwe Hermann [Mon, 13 Jan 2020 00:40:24 +0000 (01:40 +0100)]
sdcard_sd: Automatically generate token field annotation classes.

2 months agosdcard_sd: Put 0/1 bits in different annotation classes.
Uwe Hermann [Sun, 12 Jan 2020 23:50:03 +0000 (00:50 +0100)]
sdcard_sd: Put 0/1 bits in different annotation classes.

This will allow for usage of different colors in UIs, and for
showing/hiding them independently in UIs.

2 months agosdcard_sd: Put card status fields in their own annotation classes.
Uwe Hermann [Sun, 12 Jan 2020 23:26:46 +0000 (00:26 +0100)]
sdcard_sd: Put card status fields in their own annotation classes.

This also fixes the CURRENT_STATE and RSVD_TESTMODE fields, which are
not single-bit fields.

2 months agosdcard_sd: Add basic support for CSD register fields.
Uwe Hermann [Sun, 12 Jan 2020 22:42:16 +0000 (23:42 +0100)]
sdcard_sd: Add basic support for CSD register fields.

2 months agosdcard_sd: Add basic support for CID register fields.
Uwe Hermann [Sun, 12 Jan 2020 19:08:59 +0000 (20:08 +0100)]
sdcard_sd: Add basic support for CID register fields.

2 months agosdcard_sd: Rename some annotation classes.
Uwe Hermann [Sun, 12 Jan 2020 18:07:14 +0000 (19:07 +0100)]
sdcard_sd: Rename some annotation classes.

The responses were simply named "R1" etc., but this becomes inconvenient
when Ann.prefixeÑ•('R') is used and other annotation classes also have
names that start with 'R'. Hence, rename respose annotation classes to
"RESPONSE_R1" etc.

2 months agosdcard_sd: Use a Bit class to improve readability.
Uwe Hermann [Fri, 10 Jan 2020 23:46:40 +0000 (00:46 +0100)]
sdcard_sd: Use a Bit class to improve readability.

Usually we'd use namedtuple(), but in this case we need to
retro-actively modify the items, so that's not possible.

2 months agosdcard_sd: Replace a hardcoded number for better readability.
Uwe Hermann [Fri, 10 Jan 2020 23:49:20 +0000 (00:49 +0100)]
sdcard_sd: Replace a hardcoded number for better readability.

2 months agosdcard_sd: Clarify some variable/argument names.
Uwe Hermann [Fri, 10 Jan 2020 23:41:36 +0000 (00:41 +0100)]
sdcard_sd: Clarify some variable/argument names.

Differentiate cmd (e.g. 55 or CMD55) vs. cmd_pin (the value of the CMD pin).

2 months agosdcard_sd: Remove a list that needs manual maintenance.
Uwe Hermann [Fri, 10 Jan 2020 23:17:44 +0000 (00:17 +0100)]
sdcard_sd: Remove a list that needs manual maintenance.

Instead of checking if a command is in a fixed list/tuple (that needs
to be manually updated every time a new command becomes supported),
simply check if the respective handling method for the command exists.

This fixes the bug of the CMD16 handler not being called, and will
prevent similar bugs in the future.

2 months agosdcard_sd: Use correct annotation class for R2.
Uwe Hermann [Fri, 10 Jan 2020 22:36:30 +0000 (23:36 +0100)]
sdcard_sd: Use correct annotation class for R2.

2 months agocjtag: Use SrdIntEnum for cJTAG states.
Uwe Hermann [Fri, 10 Jan 2020 22:05:50 +0000 (23:05 +0100)]
cjtag: Use SrdIntEnum for cJTAG states.

2 months agosda2506: Use SrdIntEnum for pins.
Uwe Hermann [Fri, 10 Jan 2020 20:35:00 +0000 (21:35 +0100)]
sda2506: Use SrdIntEnum for pins.

2 months agotlc5620: Use SrdIntEnum for pins.
Uwe Hermann [Fri, 10 Jan 2020 20:31:24 +0000 (21:31 +0100)]
tlc5620: Use SrdIntEnum for pins.

2 months agomaple_bus: Use SrdIntEnum for pins.
Uwe Hermann [Fri, 10 Jan 2020 20:28:06 +0000 (21:28 +0100)]
maple_bus: Use SrdIntEnum for pins.

2 months agosdcard_sd: Use SrdIntEnum for pins.
Uwe Hermann [Fri, 10 Jan 2020 20:15:38 +0000 (21:15 +0100)]
sdcard_sd: Use SrdIntEnum for pins.

2 months agosdcard_sd: Simplify self.putr() invocations.
Uwe Hermann [Fri, 10 Jan 2020 20:10:53 +0000 (21:10 +0100)]
sdcard_sd: Simplify self.putr() invocations.

2 months agosdcard_sd: Put responses in their own annotation classes.
Uwe Hermann [Fri, 10 Jan 2020 19:30:36 +0000 (20:30 +0100)]
sdcard_sd: Put responses in their own annotation classes.

Also, rename "reply" to "response" to use the wording from the spec.

2 months agosdcard_sd: Use SrdIntEnum for annotation classes.
Uwe Hermann [Fri, 10 Jan 2020 17:27:20 +0000 (18:27 +0100)]
sdcard_sd: Use SrdIntEnum for annotation classes.

2 months agocjtag: Use SrdStrEnum for the state machine.
Uwe Hermann [Fri, 10 Jan 2020 16:49:28 +0000 (17:49 +0100)]
cjtag: Use SrdStrEnum for the state machine.

2 months agojtag: Use SrdStrEnum for the state machine.
Uwe Hermann [Thu, 2 Jan 2020 14:40:22 +0000 (15:40 +0100)]
jtag: Use SrdStrEnum for the state machine.

2 months agoedid: Use SrdIntEnum for the state machine.
Uwe Hermann [Thu, 2 Jan 2020 13:06:10 +0000 (14:06 +0100)]
edid: Use SrdIntEnum for the state machine.

2 months agosdcard_sd: Use SrdStrEnum for the state machine.
Uwe Hermann [Wed, 1 Jan 2020 23:30:21 +0000 (00:30 +0100)]
sdcard_sd: Use SrdStrEnum for the state machine.

2 months agosrdhelper: Add SrdStrEnum with various helper methods.
Uwe Hermann [Wed, 1 Jan 2020 23:30:51 +0000 (00:30 +0100)]
srdhelper: Add SrdStrEnum with various helper methods.

2 months agousb_signalling: Use SrdIntEnum for the state machine.
Uwe Hermann [Wed, 1 Jan 2020 22:53:09 +0000 (23:53 +0100)]
usb_signalling: Use SrdIntEnum for the state machine.

2 months agojtag_ejtag: Use SrdIntEnum for annotation classes.
Uwe Hermann [Wed, 1 Jan 2020 19:27:47 +0000 (20:27 +0100)]
jtag_ejtag: Use SrdIntEnum for annotation classes.

2 months agomcs48: Use SrdIntEnum for annotation classes.
Uwe Hermann [Wed, 1 Jan 2020 19:22:03 +0000 (20:22 +0100)]
mcs48: Use SrdIntEnum for annotation classes.

2 months agoac97: Rename Pins class to Pin.
Uwe Hermann [Fri, 10 Jan 2020 16:24:37 +0000 (17:24 +0100)]
ac97: Rename Pins class to Pin.

2 months agoac97: Use SrdIntEnum for annotation/binary/pin classes.
Uwe Hermann [Wed, 1 Jan 2020 17:22:44 +0000 (18:22 +0100)]
ac97: Use SrdIntEnum for annotation/binary/pin classes.

2 months agospiflash: Use SrdIntEnum for annotation classes.
Uwe Hermann [Wed, 1 Jan 2020 17:09:51 +0000 (18:09 +0100)]
spiflash: Use SrdIntEnum for annotation classes.

Also, automate construction of the Ann SrdIntEnum.
This avoids having to remember to manually keep two lists in sync.

2 months agosdcard_spi: Use ternary operator where possible.
Uwe Hermann [Fri, 10 Jan 2020 19:41:57 +0000 (20:41 +0100)]
sdcard_spi: Use ternary operator where possible.

2 months agosdcard_spi: Use SrdIntEnum for annotation classes.
Uwe Hermann [Wed, 1 Jan 2020 17:08:17 +0000 (18:08 +0100)]
sdcard_spi: Use SrdIntEnum for annotation classes.

This also fixes incorrect annotation classes for bit, bit warning, and R1.

Also, auto-generate some more parts of the annotation class listing.

2 months agods1307: Use SrdIntEnum for annotation classes.
Uwe Hermann [Wed, 1 Jan 2020 15:17:47 +0000 (16:17 +0100)]
ds1307: Use SrdIntEnum for annotation classes.

2 months agods1307: Consistently use _ instead of - for various IDs.
Uwe Hermann [Wed, 1 Jan 2020 15:27:20 +0000 (16:27 +0100)]
ds1307: Consistently use _ instead of - for various IDs.

2 months agocc1101: Use SrdIntEnum for annotation classes.
Uwe Hermann [Wed, 1 Jan 2020 14:36:47 +0000 (15:36 +0100)]
cc1101: Use SrdIntEnum for annotation classes.

2 months agoamulet_ascii: Use SrdIntEnum for annotation classes.
Uwe Hermann [Wed, 1 Jan 2020 13:50:12 +0000 (14:50 +0100)]
amulet_ascii: Use SrdIntEnum for annotation classes.

Also, automate construction of the Ann SrdIntEnum.
This avoids having to remember to manually keep two lists in sync.

2 months agosrdhelper: Add SrdIntEnum with various helper methods.
Uwe Hermann [Wed, 1 Jan 2020 17:59:13 +0000 (18:59 +0100)]
srdhelper: Add SrdIntEnum with various helper methods.

2 months agocjtag: Drop no longer needed _real variable name suffix.
Uwe Hermann [Wed, 8 Jan 2020 23:19:45 +0000 (00:19 +0100)]
cjtag: Drop no longer needed _real variable name suffix.

2 months agocjtag: Give each cJTAG state its own annotation class.
Uwe Hermann [Wed, 8 Jan 2020 23:10:41 +0000 (00:10 +0100)]
cjtag: Give each cJTAG state its own annotation class.

2 months agocjtag: Use correct TCKC/TMSC channel names.
Uwe Hermann [Wed, 8 Jan 2020 22:34:16 +0000 (23:34 +0100)]
cjtag: Use correct TCKC/TMSC channel names.

2 months agocjtag: Drop some unused method arguments.
Uwe Hermann [Wed, 8 Jan 2020 22:32:40 +0000 (23:32 +0100)]
cjtag: Drop some unused method arguments.

2 months agocjtag: Drop non-existing channels from the decoder.
Uwe Hermann [Wed, 8 Jan 2020 22:21:54 +0000 (23:21 +0100)]
cjtag: Drop non-existing channels from the decoder.

cJTAG only has two wires/channels.

2 months agocjtag: Use ternary operator where possible.
Uwe Hermann [Wed, 8 Jan 2020 21:52:53 +0000 (22:52 +0100)]
cjtag: Use ternary operator where possible.

2 months agocjtag: Use += operator where possible.
Uwe Hermann [Wed, 8 Jan 2020 21:50:16 +0000 (22:50 +0100)]
cjtag: Use += operator where possible.

2 months agocjtag: Drop various unneeded parenthesis.
Uwe Hermann [Wed, 8 Jan 2020 21:49:33 +0000 (22:49 +0100)]
cjtag: Drop various unneeded parenthesis.

2 months agocjtag: Use plural for annotation row IDs/names.
Uwe Hermann [Wed, 8 Jan 2020 21:41:08 +0000 (22:41 +0100)]
cjtag: Use plural for annotation row IDs/names.

2 months agocjtag: Add cJTAG OSCAN1 decoder.
Kongou Hikari [Thu, 5 Dec 2019 10:37:05 +0000 (18:37 +0800)]
cjtag: Add cJTAG OSCAN1 decoder.

[Note: This is a commit from Kongou Hikari ("diodep" on GitHub) that was
"rebased" by Uwe Hermann on top of the current libsigrokdecode mainline JTAG
decoder. There are various reasons for this, including avoiding non-mainline
or outdated decoder changes, as well as making it easily visible what the
changes vs. the current JTAG decoder are, in case we later need to apply some
changes to both decoders or in case both decoders might be merged later on.
Minor cosmetic and naming changes were also squashed in (no functional
changes, though).]

2 months agocjtag: Use an exact copy of the jtag PD as basis for cjtag.
Uwe Hermann [Wed, 8 Jan 2020 21:18:16 +0000 (22:18 +0100)]
cjtag: Use an exact copy of the jtag PD as basis for cjtag.

3 months agospiflash: Don't use ambiguous annotation class names.
Uwe Hermann [Sun, 5 Jan 2020 14:49:18 +0000 (15:49 +0100)]
spiflash: Don't use ambiguous annotation class names.

This is not technically a bug since (at least some) datasheets refer
to this command as "Chip erase", it just happens to have two different
command codes (0x60 and 0xc7).

In order to not confuse users with two annotation classes with the
same name, we'll call the second one "Chip erase 2" to match the
"CE2" short name.

This fixes bug #1482.

3 months agodmx512: stack DMX512 on top of UART and improve usability
Gerhard Sittig [Wed, 27 Nov 2019 20:54:11 +0000 (21:54 +0100)]
dmx512: stack DMX512 on top of UART and improve usability

It was unfortunate that the previous DMX512 decoder implementation
re-invented UART decoder features and introduced new issues in the
process. Automatic polarity detection is just impossible when the full
set of valid DMX timings is to get supported. Sample numbers suffered
from floating point rounding errors.

Introduce a stacked decoder on top of UART which exclusively deals with
DMX512 details, and transparently benefits from all available UART
features (adjustable polarity, robust and correct sampling, data byte
accumulation, BREAK detection while silencing false STOP violations). On
one hand this requires users to specify the bitrate (250kbps), on the
other hand it results in reliable operation for all captures that have
become available so far.

Provide Python output for stacked decoders which can process protocol
extensions like RDM. Prepare the DMX512 decoder itself to handle simple
cases of protocol extensions (start codes other than 0). Add support for
additional constraint checks, emit warnings when user specified limits
are violated: short BREAK, long MARK, long RESET to RESET and short
BREAK to BREAK intervals. This shall speedup the identification of bus
health issues (data loss or corruption) or improper controller timing.

Also hide all-zero values by default, to make used channels visually
stand out, and help users focus their attention. For special cases (like
16bit data, or zero being a valid set-point for the channels) users can
enforce the display of all values. Provide an option to present byte
values to users in the most appropriate format for the use case.

This resolves bug #1442.

3 months agodmx512: remove previous implementation before replacing it
Gerhard Sittig [Fri, 3 Jan 2020 21:59:47 +0000 (22:59 +0100)]
dmx512: remove previous implementation before replacing it

The existing DMX512 decoder implementation duplicates UART specific
knowledge, and implements some of the redundant logic in ways which fail
to interpret correct input data. See bug #1442 for details.

This commit removes the previous decoder implementation before adding a
more recent version, to gain a more readable history across that decoder

3 months agops2: end data byte at rising clock edge of the stop bit
Gerhard Sittig [Sat, 21 Dec 2019 16:02:50 +0000 (17:02 +0100)]
ps2: end data byte at rising clock edge of the stop bit

Data byte transmission is complete when the STOP bit was communicated.
End the STOP bit at the rising CLOCK edge of the 11th bit time, do not
rely on the host's clock inhibit after data transmission. This avoids
the unexpected expansion of a STOP bit well into the next data byte.

This fixes bug #1460, where absence of host activity after the first
data byte loses synchronization to the input stream.

Rephrase pin level sampling while we are here. Reflect that the clock
line is used for .wait() conditions, but its level is not evaluated.
Only data line levels get processed.

Comment on the implementation's assumption of specific input data (the
device as transmitter, host transmit may not be supported, or can result
in unexpected output). Which may be acceptable yet maintainers need to
remain aware.

3 months agoflexray: fix annotation for 'frame end sequence'
Stephan Thiele [Thu, 2 Jan 2020 19:46:23 +0000 (20:46 +0100)]
flexray: fix annotation for 'frame end sequence'

3 months agoamulet_ascii: Minor consistency fix.
Uwe Hermann [Wed, 1 Jan 2020 13:29:21 +0000 (14:29 +0100)]
amulet_ascii: Minor consistency fix.

3 months agoxfp: Add annotation rows.
Uwe Hermann [Tue, 31 Dec 2019 23:18:09 +0000 (00:18 +0100)]
xfp: Add annotation rows.

3 months agomodbus: Add missing annotation class names.
Uwe Hermann [Tue, 31 Dec 2019 22:20:12 +0000 (23:20 +0100)]
modbus: Add missing annotation class names.

3 months agomlx90614: Add annotation rows.
Uwe Hermann [Tue, 31 Dec 2019 22:09:29 +0000 (23:09 +0100)]
mlx90614: Add annotation rows.

Previously there were two different annotation classes with 100% overlap.

3 months agocc1101: Add missing annotation class.
Uwe Hermann [Tue, 31 Dec 2019 21:03:53 +0000 (22:03 +0100)]
cc1101: Add missing annotation class.

This was causing incorrect annotation class indices to be used.

3 months agoAll PDs: Consistently use singular/plural for annotation classes/rows.
Uwe Hermann [Mon, 30 Dec 2019 17:33:32 +0000 (18:33 +0100)]
All PDs: Consistently use singular/plural for annotation classes/rows.

3 months agox2444m: Eliminate duplicate annotation class ID.
Uwe Hermann [Mon, 30 Dec 2019 15:55:30 +0000 (16:55 +0100)]
x2444m: Eliminate duplicate annotation class ID.

3 months agosrd_decoder_load(): Error out upon various duplicate IDs.
Uwe Hermann [Mon, 30 Dec 2019 15:31:25 +0000 (16:31 +0100)]
srd_decoder_load(): Error out upon various duplicate IDs.

3 months agoHACKING: Add some Python coding style hints, fix incorrect docs.
Uwe Hermann [Mon, 30 Dec 2019 16:04:17 +0000 (17:04 +0100)]
HACKING: Add some Python coding style hints, fix incorrect docs.

3 months agouart: Use human-readable names for binary classes.
Uwe Hermann [Mon, 30 Dec 2019 11:26:19 +0000 (12:26 +0100)]
uart: Use human-readable names for binary classes.

3 months agouart: Fix incorrect stop bit annotation class.
Uwe Hermann [Mon, 30 Dec 2019 11:35:02 +0000 (12:35 +0100)]
uart: Fix incorrect stop bit annotation class.

This fixes bug #1474.

3 months agouart: Use human-readable names for annotation classes.
Uwe Hermann [Mon, 30 Dec 2019 11:20:45 +0000 (12:20 +0100)]
uart: Use human-readable names for annotation classes.

Using human-readable names for annotation classes (instead of numeric
indices) improves readability and maintainability of the decoder, and can
also prevent bugs due to incorrect indices.

3 months agouart: sample position nits, fix typo, float calculation awareness
Gerhard Sittig [Tue, 17 Dec 2019 10:48:23 +0000 (11:48 +0100)]
uart: sample position nits, fix typo, float calculation awareness

This commit amends bd50ceb314e4. Fix a typo in a comment. Rephrase the
bit width percentage calculation such that readers remain aware of the
necessity for floating point math in sample position calculations. This
commit does not change behaviour, Python 3 always yields float results
for divisions. It's about raising awareness.

3 months agouart: allow arbitrary sample positions for UART bit values (1-99%)
Gerhard Sittig [Wed, 4 Dec 2019 20:21:03 +0000 (21:21 +0100)]
uart: allow arbitrary sample positions for UART bit values (1-99%)

The previous implementation of the UART decoder used to sample bit values
strictly at the center position within a bit time. This commit introduces
support to sample bit values at arbitrary positions in the range of 1-99%
of the bit time. This allows to work around glitches in existing captures
as well as using the decoder for UART like protocols which don't sample
bit values at the center position (like EIB aka KNX).

This implementation is incomplete (on purpose). Although this version
improves the ability to extract data from captures, it also introduces
inaccuracies in the annotation positions for non-default values of the
sample point position. Addressing this issue is left for later, assuming
that it'll be a byproduct of another commit series that is being worked
on (general annotation position adjustment and stop bits support).

3 months agocan: Drop an unused method.
Uwe Hermann [Thu, 12 Dec 2019 21:19:58 +0000 (22:19 +0100)]
can: Drop an unused method.

3 months agosignature: increase compatibility across Python versions
Gerhard Sittig [Thu, 12 Dec 2019 09:39:57 +0000 (10:39 +0100)]
signature: increase compatibility across Python versions

Underscores in number literals are a recent Python feature which only
was introduced in version 3.6. The sigrok project claims compatibility
with previous Python versions, but the signature decoder fails to load
with this error:

  $ pulseview
  srd: SyntaxError: Failed to load decoder signature: import by name failed: invalid syntax (, line 138)
  srd: Traceback (most recent call last):
    File "/home/user/share/libsigrokdecode/decoders/signature/", line 25, in <module>
      from .pd import Decoder
    File "/home/user/share/libsigrokdecode/decoders/signature/", line 138
      incoming = (bin(shiftreg & 0b0000_0010_1001_0001).count('1') + data) & 1
  SyntaxError: invalid syntax

Use the more compact hex presentation for a magic binary pattern. This
obsoletes the necessity to separate groups of bits for readability.

3 months agoac97/lin: Remove some unneeded code snippets.
Uwe Hermann [Tue, 10 Dec 2019 21:05:51 +0000 (22:05 +0100)]
ac97/lin: Remove some unneeded code snippets.

3 months agostruct srd_decoder: Fix/improve some documentation comments.
Uwe Hermann [Tue, 10 Dec 2019 21:00:05 +0000 (22:00 +0100)]
struct srd_decoder: Fix/improve some documentation comments.

3 months agoi2cfilter: Improve description of the "address" option.
Uwe Hermann [Mon, 9 Dec 2019 20:22:07 +0000 (21:22 +0100)]
i2cfilter: Improve description of the "address" option.

3 months agodsi: Add a TODO comment for proper self.wait() usage.
Uwe Hermann [Mon, 9 Dec 2019 20:21:00 +0000 (21:21 +0100)]
dsi: Add a TODO comment for proper self.wait() usage.

All PDs where "trivial" self.wait() conversion was used now have this
specific comment, so it's easy to grep for.

3 months agosrd_decoder_doc_get(): Add an additional sanity check.
Uwe Hermann [Tue, 12 Nov 2019 21:47:41 +0000 (22:47 +0100)]
srd_decoder_doc_get(): Add an additional sanity check.

3 months agodecoders: Don't set self.samplenum.
Uwe Hermann [Sat, 7 Dec 2019 18:11:27 +0000 (19:11 +0100)]
decoders: Don't set self.samplenum.

This is managed by the backend and should be read-only for PDs.

3 months agohdcp: Add missing spaces.
Uwe Hermann [Sat, 7 Dec 2019 16:29:14 +0000 (17:29 +0100)]
hdcp: Add missing spaces.

3 months agohdcp: Reduce nesting level.
Uwe Hermann [Sat, 7 Dec 2019 15:34:46 +0000 (16:34 +0100)]
hdcp: Reduce nesting level.

3 months agohdcp: Simplify some code snippets.
Uwe Hermann [Sat, 7 Dec 2019 15:31:25 +0000 (16:31 +0100)]
hdcp: Simplify some code snippets.

3 months agohdcp: Add tags.
Uwe Hermann [Sat, 7 Dec 2019 15:17:43 +0000 (16:17 +0100)]
hdcp: Add tags.

3 months agoAdd HDCP traffic decoder to stack on i2c
Dave Craig [Wed, 2 Jan 2019 13:36:11 +0000 (13:36 +0000)]
Add HDCP traffic decoder to stack on i2c

This decoder annotates i2c traffic to indicate the type of HDCP
message contained. It includes HDCP2.2 and HDCP1.4. Useful for
analysing HDCP negotiation failures.

3 months agoieee488: flush upper layer payload data when IFC asserts
Gerhard Sittig [Sat, 7 Dec 2019 07:58:34 +0000 (08:58 +0100)]
ieee488: flush upper layer payload data when IFC asserts

Also flush previously accumulated payload data when the IFC signal
asserts (interface clear, a controller requests ownership of the bus).
This is in line with EOI (end of message) and ATN (start of a command,
including change of "connected" peers or direction of communication).

3 months agoieee488: introduce 'delim' option for improved text output
Gerhard Sittig [Sat, 7 Dec 2019 07:51:16 +0000 (08:51 +0100)]
ieee488: introduce 'delim' option for improved text output

When a capture contains output from a talking device, but neither
contains EOI (end of transmission) nor ATN (new commands, including
changes in the set of communicating peers or communication direction),
then lower layer data bytes would be shown but accumulated runs of upper
layer payload data would not. The capture demonstrates
this behaviour.

Add transparent support for the typical case of communicating SCPI over
GPIB. Do emit upper layer payload data annotations when termination
sequences for text lines were seen. Allow users to disable this feature
when it's not appropriate for binary content.

It's an internal implementation detail that accumulated data gets flushed.
Communicate the user visible option as "payload data separation", which
should most appropriately reflect the resulting behaviour. The specific
implementation of this feature can also support different kinds of payload
chunk separation.

4 months agoObsolete gpib and iec PDs in favor of ieee488.
Uwe Hermann [Fri, 6 Dec 2019 21:35:30 +0000 (22:35 +0100)]
Obsolete gpib and iec PDs in favor of ieee488.

4 months agoieee488: Mention more relevant keywords in longname.
Uwe Hermann [Fri, 6 Dec 2019 21:33:45 +0000 (22:33 +0100)]
ieee488: Mention more relevant keywords in longname.

This can be used by frontends for decoder search features.

4 months agoieee488: Simplify _get_raw_byte() a bit.
Uwe Hermann [Fri, 6 Dec 2019 21:25:55 +0000 (22:25 +0100)]
ieee488: Simplify _get_raw_byte() a bit.

4 months agoieee488: introduce unified IEEE-488 decoder (supports GPIB and IEC)
Gerhard Sittig [Thu, 3 Oct 2019 02:38:01 +0000 (04:38 +0200)]
ieee488: introduce unified IEEE-488 decoder (supports GPIB and IEC)

Introduce an 'ieee488' protocol decoder which handles both the 16 lines
parallel GPIB variant as well as the serial IEC bus variant. Which kind
of supersedes the 'gpib' and 'iec' decoders.

This implementation increases maintainability because only the extraction
of raw bytes from the parallel or serial bus is separate, and all GPIB
related command/address/data interpretation is shared. This decoder extends
the feature set of the previous versions: Visual annotations are more fine
grained (more classes, additional rows, various text lengths to maintain
usability during zoom). There is binary output for communicated data,
as well as Python output for stacked decoders. Consecutive runs of
talker data gets accumulated, and is made available in binary form as well
as text (with escapes for non-printables). The terse single-letter format
(character codes '0' to 'O' for addresses) is kept for compatibility for
those users who are accustomed to it. The implemented logic also copes
with captures of low samplerate, where edges happen to fall onto the same
sample number which at higher samplerates shall be perceived as distant
and should get processed in their respective order of appearance.

This implementation tracks the most recent configuration of "peers" (the
set of talkers and listeners). A future implementation might support the
isolation of a single conversation out of a busy chat on the bus.

Some optional support for Commodore peripherals is included (currently
limited to disk channels), while it's recommended to move this logic to
a stacked decoder if it grows more complex.

4 months agoir_rc6: Reduce nesting level.
Uwe Hermann [Tue, 3 Dec 2019 20:37:53 +0000 (21:37 +0100)]
ir_rc6: Reduce nesting level.

4 months agoir_rc6: Initial commit
BenediktO [Sun, 1 Dec 2019 11:32:12 +0000 (12:32 +0100)]
ir_rc6: Initial commit

4 months agoir_rc5: improved performance
BenediktO [Sat, 30 Nov 2019 17:57:32 +0000 (18:57 +0100)]
ir_rc5: improved performance

4 months agoflexray: Use bit/s instead of Mbit/s for bitrate.
Uwe Hermann [Sat, 30 Nov 2019 14:17:50 +0000 (15:17 +0100)]
flexray: Use bit/s instead of Mbit/s for bitrate.

This avoids floating point number option values, which makes things
a bit easier/clearer on the command-line and also matches what other
decoders do.

Also, use numbers instead of strings for the option values.

4 months agoflexray: add basic decoder
Stephan Thiele [Tue, 5 Mar 2019 23:15:27 +0000 (00:15 +0100)]
flexray: add basic decoder

4 months agones_gamepad: implement and add decoder
Stephan Thiele [Sun, 27 Oct 2019 20:59:17 +0000 (21:59 +0100)]
nes_gamepad: implement and add decoder

4 months agouart: Drop question mark from two option names.
Uwe Hermann [Fri, 29 Nov 2019 23:36:53 +0000 (00:36 +0100)]
uart: Drop question mark from two option names.

4 months agouart: Shorten various decoder option names.
Uwe Hermann [Fri, 29 Nov 2019 22:51:19 +0000 (23:51 +0100)]
uart: Shorten various decoder option names.

This makes the decoder a lot nicer to use from the command-line.

 * num_data_bits -> data_bits
 * parity_type -> parity
 * num_stop_bits -> stop_bits
 * rx_packet_delimiter -> rx_packet_delim
 * tx_packet_delimiter -> tx_packet_delim

4 months agouart: rephrase check for required input signals, reword error message
Gerhard Sittig [Fri, 29 Nov 2019 21:02:51 +0000 (22:02 +0100)]
uart: rephrase check for required input signals, reword error message

Rephrase the test for the availability of at least one of several
optional input signals, and reword the corresponding error message.

4 months agouart: support 'ignore' parity type, remove unsupported 'check_parity' option
Gerhard Sittig [Fri, 29 Nov 2019 20:15:48 +0000 (21:15 +0100)]
uart: support 'ignore' parity type, remove unsupported 'check_parity' option

The previous UART decoder implementation announced a 'check_parity'
option which took no effect (support code was missing). Remove it. Add
another 'ignore' parity choice instead, which consumes the parity bit's
position yet always passes the check.

4 months agoRemove left-over FSF postal address from boiler plate license text.
Uwe Hermann [Fri, 29 Nov 2019 22:18:54 +0000 (23:18 +0100)]
Remove left-over FSF postal address from boiler plate license text.

4 months agodecoders: Use a slightly more consistent/logical annotation row setup.
Uwe Hermann [Fri, 29 Nov 2019 21:49:04 +0000 (22:49 +0100)]
decoders: Use a slightly more consistent/logical annotation row setup.

Generally show "bits" and other smaller annotations in rows that come
before "larger" annotations (in later rows).

4 months agoir_nec: fix #1243, multiple capture frames.
Philipp Marek [Wed, 4 Jul 2018 12:41:17 +0000 (14:41 +0200)]
ir_nec: fix #1243, multiple capture frames.

4 months agows281x: Check for "None" before subtracting.
Philipp Marek [Wed, 6 Nov 2019 18:26:49 +0000 (19:26 +0100)]
ws281x: Check for "None" before subtracting.