]> sigrok.org Git - libsigrokdecode.git/log
libsigrokdecode.git
3 years agopjon: introduce decoder for PJON frame inspection
Gerhard Sittig [Sat, 20 Jun 2020 07:31:18 +0000 (09:31 +0200)]
pjon: introduce decoder for PJON frame inspection

Introduce a protocol decoder which accepts 'pjon-link' Python input and
interprets PJON frames. The implementation is assumed to be operational
but most of the protocol's flexibility (optionally present and variable
width fields) has not yet been tested due to lack of example captures.
During development of the PJON decoder only the PJDL link layer decoder
was available, other link layers were not tested.

3 years agopjdl: introduce decoder for PJON single wire serial link layer
Gerhard Sittig [Mon, 15 Jun 2020 11:37:18 +0000 (13:37 +0200)]
pjdl: introduce decoder for PJON single wire serial link layer

Introduce a protocol decoder which generates 'pjon-link' output from
'logic' input by interpreting the PJDL single wire serial communication
link layer of the PJON protocol stack. This decoder extracts frame
markers, data bytes, as well as their pad/sync decoration. Inspection of
data values, or checks for frame validity remain the responsibility of a
stacked decoder which is shared among several link layer types.

This implementation "violates" the PJDL spec in those places where the
spec is incomplete or vague, and real world traffic would not decode at
all when the strict letter of the spec is applied instead of its spirit.
When in doubt, the decoder implementation errs to the usability side.

Carrier sense detection is incomplete in this version. Data extraction
works for all currently available captures. Recovery from synchronization
loss after glitches is acceptable. Glitch filtering is missing (the spec
is silent on this subject).

3 years agojtag: Use list.append instead of insert
Konrad Beckmann [Mon, 22 Jun 2020 01:55:07 +0000 (03:55 +0200)]
jtag: Use list.append instead of insert

Improve processing time by appending bits
instead of inserting them to the lists.

3 years agonrf905: Drop non-existent OUTPUT_PYTHON output.
Uwe Hermann [Tue, 26 May 2020 20:24:24 +0000 (22:24 +0200)]
nrf905: Drop non-existent OUTPUT_PYTHON output.

3 years agonrf905: More readable annotation byte values.
Uwe Hermann [Tue, 26 May 2020 20:06:03 +0000 (22:06 +0200)]
nrf905: More readable annotation byte values.

Drop the 0x prefix for each byte in annotations (for improved readability).

Also, use 02X instead of 02x (printf-style formats).

3 years agonrf905: Drop all print() calls.
Uwe Hermann [Tue, 26 May 2020 19:52:52 +0000 (21:52 +0200)]
nrf905: Drop all print() calls.

If those are useful for the decoder user, they should be annotations
using the Ann.WARN annotation class.

3 years agonrf905: Simplify a few code snippets.
Uwe Hermann [Tue, 26 May 2020 19:50:43 +0000 (21:50 +0200)]
nrf905: Simplify a few code snippets.

3 years agonrf905: Use SrdIntEnum for annotation classes.
Uwe Hermann [Tue, 26 May 2020 19:36:44 +0000 (21:36 +0200)]
nrf905: Use SrdIntEnum for annotation classes.

3 years agonrf905: Add missing 'tags' item.
Uwe Hermann [Tue, 26 May 2020 18:58:13 +0000 (20:58 +0200)]
nrf905: Add missing 'tags' item.

3 years agontf905: Add/rename required self.reset() method.
Uwe Hermann [Tue, 26 May 2020 18:57:50 +0000 (20:57 +0200)]
ntf905: Add/rename required self.reset() method.

3 years agoAdd decoder for Nordic Semiconductor nRF905 chip
Jorge Solla [Tue, 7 Apr 2020 21:37:13 +0000 (23:37 +0200)]
Add decoder for Nordic Semiconductor nRF905 chip

3 years agoUse PyLong_FromUnsignedLongLong() where needed.
Uwe Hermann [Fri, 22 May 2020 11:06:26 +0000 (13:06 +0200)]
Use PyLong_FromUnsignedLongLong() where needed.

There were a few places where PyLong_FromLong() was used for uint64_t
numbers. Properly use PyLong_FromUnsignedLongLong() there, and also
fix a few additional size/signedness issues while we're here.

Reported (and partial patch provided) by "The Count" on Bugzilla, thanks!

This fixes bug #1499.

3 years agotype_decoder.c: Workaround for a compiler warning.
Uwe Hermann [Thu, 21 May 2020 14:40:23 +0000 (16:40 +0200)]
type_decoder.c: Workaround for a compiler warning.

  type_decoder.c:1040:16: warning: cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *, struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’} [-Wcast-function-type]
   1040 |  { "register", (PyCFunction)Decoder_register, METH_VARARGS|METH_KEYWORDS,
        |                ^

3 years agoadxl345: Update register meaning for 0x21, 0x22, 0x23 regs.
Teo Perisanu [Tue, 5 May 2020 09:46:34 +0000 (12:46 +0300)]
adxl345: Update register meaning for 0x21, 0x22, 0x23 regs.

On the Data row, the content of the single-byte registers is decoded as
follows: '<Meaning> <Value> <Unit>'. Initially, the meaning for these
registers was misplaced. This commit updates these meanings as they
really are.

Signed-off-by: Teo Perisanu <redacted>
4 years agoad79x0: Rename the 'ref' option to 'vref'.
Uwe Hermann [Fri, 10 Apr 2020 23:32:56 +0000 (01:32 +0200)]
ad79x0: Rename the 'ref' option to 'vref'.

4 years agoad79x0: Reduce unnecessarily many voltage formats.
Uwe Hermann [Fri, 10 Apr 2020 23:20:29 +0000 (01:20 +0200)]
ad79x0: Reduce unnecessarily many voltage formats.

4 years agoad79x0: Fix the tags metadata item.
Uwe Hermann [Fri, 10 Apr 2020 23:01:57 +0000 (01:01 +0200)]
ad79x0: Fix the tags metadata item.

4 years agoad79x0: Avoid duplicated annotation class/row IDs.
Uwe Hermann [Fri, 10 Apr 2020 22:58:00 +0000 (00:58 +0200)]
ad79x0: Avoid duplicated annotation class/row IDs.

4 years agoAdd AD79x0 decoder.
Teo Perisanu [Thu, 19 Mar 2020 07:54:05 +0000 (09:54 +0200)]
Add AD79x0 decoder.

Signed-off-by: Teo Perisanu <redacted>
4 years agoad5626: Always use the same number of decimal places.
Uwe Hermann [Fri, 10 Apr 2020 22:41:11 +0000 (00:41 +0200)]
ad5626: Always use the same number of decimal places.

4 years agoad5626: Rename an annotation class.
Uwe Hermann [Fri, 10 Apr 2020 22:36:43 +0000 (00:36 +0200)]
ad5626: Rename an annotation class.

4 years agoad5626: Drop unnecessary annotation_rows item.
Uwe Hermann [Fri, 10 Apr 2020 22:32:46 +0000 (00:32 +0200)]
ad5626: Drop unnecessary annotation_rows item.

4 years agoad5626: Fix the tags metadata item.
Uwe Hermann [Fri, 10 Apr 2020 21:52:10 +0000 (23:52 +0200)]
ad5626: Fix the tags metadata item.

4 years agoAdd AD5626 decoder.
Teo Perisanu [Thu, 19 Mar 2020 07:53:51 +0000 (09:53 +0200)]
Add AD5626 decoder.

Signed-off-by: Teo Perisanu <redacted>
4 years agoltc242x: Reduce unnecessarily many voltage formats.
Uwe Hermann [Fri, 10 Apr 2020 20:27:11 +0000 (22:27 +0200)]
ltc242x: Reduce unnecessarily many voltage formats.

4 years agoltc242x: Put channel voltages on different annotation rows.
Uwe Hermann [Fri, 10 Apr 2020 20:24:13 +0000 (22:24 +0200)]
ltc242x: Put channel voltages on different annotation rows.

Drop the pure channel "marking" annotations, they're unneeded.

4 years agoltc242x: Use plural for annotation rows, avoid duplicates.
Uwe Hermann [Fri, 10 Apr 2020 20:13:15 +0000 (22:13 +0200)]
ltc242x: Use plural for annotation rows, avoid duplicates.

Since recent libsigrokdecode changes, annotation classes and rows must
not have overlapping IDs.

4 years agoltc242x: Rename the 'ref' option to 'vref'.
Uwe Hermann [Fri, 10 Apr 2020 20:07:04 +0000 (22:07 +0200)]
ltc242x: Rename the 'ref' option to 'vref'.

4 years agoltc242x: Fix the tags metadata item.
Uwe Hermann [Fri, 10 Apr 2020 20:06:24 +0000 (22:06 +0200)]
ltc242x: Fix the tags metadata item.

4 years agoAdd LTC242x decoder.
Teo Perisanu [Thu, 19 Mar 2020 07:53:40 +0000 (09:53 +0200)]
Add LTC242x decoder.

Signed-off-by: Teo Perisanu <redacted>
4 years agoltc26x7: Put channel voltages on different annotation rows.
Uwe Hermann [Fri, 10 Apr 2020 23:50:51 +0000 (01:50 +0200)]
ltc26x7: Put channel voltages on different annotation rows.

4 years agoltc26x7: Reduce unnecessarily many voltage formats.
Uwe Hermann [Fri, 10 Apr 2020 23:37:19 +0000 (01:37 +0200)]
ltc26x7: Reduce unnecessarily many voltage formats.

4 years agoltc26x7: Fix the default for the 'chip' option.
Uwe Hermann [Fri, 10 Apr 2020 19:56:40 +0000 (21:56 +0200)]
ltc26x7: Fix the default for the 'chip' option.

4 years agoltc26x7: Option renames for consistency.
Uwe Hermann [Fri, 10 Apr 2020 19:36:52 +0000 (21:36 +0200)]
ltc26x7: Option renames for consistency.

The 'part' option is renamed to 'chip' (and 'ref' to 'vref') to be more
consistent with the naming used in other decoders.

4 years agoltc26x7: Fix the tags metadata item.
Uwe Hermann [Fri, 10 Apr 2020 19:31:06 +0000 (21:31 +0200)]
ltc26x7: Fix the tags metadata item.

4 years agoltc26x7: Drop unnecessary annotation_rows item.
Uwe Hermann [Fri, 10 Apr 2020 19:27:16 +0000 (21:27 +0200)]
ltc26x7: Drop unnecessary annotation_rows item.

All annotation classes are on the same row anyway, and the row name
"LTC26x7 data" isn't all that much more useful than no row name at all.

4 years agoAdd LTC26x7 decoder.
Teo Perisanu [Thu, 19 Mar 2020 07:53:27 +0000 (09:53 +0200)]
Add LTC26x7 decoder.

Signed-off-by: Teo Perisanu <redacted>
4 years agoadxl345: Fix incorrect rate value in handle_reg_0x2c().
Uwe Hermann [Sat, 11 Apr 2020 12:50:56 +0000 (14:50 +0200)]
adxl345: Fix incorrect rate value in handle_reg_0x2c().

4 years agoadxl345: Use all-lowercase method named for handle_reg_*.
Uwe Hermann [Fri, 10 Apr 2020 19:06:50 +0000 (21:06 +0200)]
adxl345: Use all-lowercase method named for handle_reg_*.

4 years agoadxl345: Use SrdIntEnum for the state machine.
Uwe Hermann [Fri, 10 Apr 2020 18:58:26 +0000 (20:58 +0200)]
adxl345: Use SrdIntEnum for the state machine.

4 years agoadxl345: Use SrdIntEnum for annotation classes.
Uwe Hermann [Fri, 10 Apr 2020 18:53:11 +0000 (20:53 +0200)]
adxl345: Use SrdIntEnum for annotation classes.

4 years agoadxl345: Fix scale factor in handle_reg_0x22().
Uwe Hermann [Fri, 10 Apr 2020 18:29:52 +0000 (20:29 +0200)]
adxl345: Fix scale factor in handle_reg_0x22().

According to the datasheet, this should be 1.25 (ms/LSB).

4 years agoadxl345: Shorten/simplify self.putbs() invocations.
Uwe Hermann [Fri, 10 Apr 2020 16:52:18 +0000 (18:52 +0200)]
adxl345: Shorten/simplify self.putbs() invocations.

4 years agoadxl345: Shorten/simplify a few code snippets.
Uwe Hermann [Fri, 10 Apr 2020 16:39:21 +0000 (18:39 +0200)]
adxl345: Shorten/simplify a few code snippets.

4 years agoAdd ADXL345 decoder.
Teo Perisanu [Tue, 17 Mar 2020 08:52:37 +0000 (10:52 +0200)]
Add ADXL345 decoder.

Signed-off-by: Teo Perisanu <redacted>
4 years agosdcard_sd: Automatically generate token field annotation classes.
Uwe Hermann [Mon, 13 Jan 2020 00:40:24 +0000 (01:40 +0100)]
sdcard_sd: Automatically generate token field annotation classes.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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).

4 years 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.

4 years 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.

4 years 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.

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

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

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

4 years 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.

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

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

4 years 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.

4 years 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).]

4 years 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.

4 years 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.

4 years 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.

4 years 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
replacement.

4 years 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.

4 years 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'

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

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