]> sigrok.org Git - libsigrokdecode.git/log
libsigrokdecode.git
3 years agoirmp: workaround incomplete platform detection when under libtool
Gerhard Sittig [Sun, 23 Feb 2020 04:26:18 +0000 (05:26 +0100)]
irmp: workaround incomplete platform detection when under libtool

The upstream IRMP project builds fine with direct gcc(1) invocation.
While the same imported source fails detection and then defaults to AVR
when built under libtool in the libsigrokdecode setup.

Provide the symbols which IRMP logic expects, to reduce changes against
upstream sources. Derive these symbols from conditions that are checked
in the sigrok project in other locations, too.

3 years agoirmp: silence core logic ANALYZE output from the shared library
Gerhard Sittig [Sat, 22 Feb 2020 08:38:32 +0000 (09:38 +0100)]
irmp: silence core logic ANALYZE output from the shared library

Workaround the default verbosity level of the IRMP core logic for
PC library build configurations. Silence the ANALYZE related output.

3 years agoirmp: rework shared library (style, reliability, TODO items)
Gerhard Sittig [Sat, 22 Feb 2020 06:27:58 +0000 (07:27 +0100)]
irmp: rework shared library (style, reliability, TODO items)

Address several style nits in the previous implementation of the PC
library, but keep the core as is to simplify future upstream tracking.

Eliminate camel case identifiers, and in(?)/out prefixes for variables,
only keep s_ for global(?) variables. Fixup whitespace, reduce a little
indentation where appropriate. Separate variable declaration from later
assignments and updates to improve readability. Use C style comments.

Drop initializer values for .bss variables. Decorate the declaration as
well as implementation of routines for symbol export. Improve robustness
of name lookups in the list of known protocols.

Prefer native C language data types in the public API. Normalize data in
the wrapper so that application code need not care. Make the byte buffer
API for IR frame detection optional. The API is limited and overloaded
at the same time, and may need more consideration.

Extend comments in spots which are essential for proper operation, or
which encode non-obvious details of the build system. Control visibility
of public API identifiers on non-Windows platforms, too. Rephrase the
doxygen comments for more formal API documentation. Discuss limitations
in the current implementation. Keep a TODO list in the source code.

3 years agoirmp: introduce PC side shared library code for IRMP core logic
Gerhard Sittig [Sat, 22 Feb 2020 06:09:37 +0000 (07:09 +0100)]
irmp: introduce PC side shared library code for IRMP core logic

Introduce sources which implement a shared object (DLL) which embeds the
IRMP core logic, receives pin values from an application, and makes IR
detection from previously captured data available in PC environments as
a library, in contrast to the text oriented desktop applications and the
MCU firmware which existed before in the upstream project.

Provided by: Rene Staffen

3 years agoirmp: introduce variables for start of IR frame and current sample
Gerhard Sittig [Sat, 22 Feb 2020 05:49:03 +0000 (06:49 +0100)]
irmp: introduce variables for start of IR frame and current sample

Introduce variables in the IRMP core logic which track the current
sample number, and the position where the start of an IR frame got
detected. The variables are conditional (ANALYZE builds only).

Provided by: Rene Staffen

Local modification: Drop the initializer for the static variables.
They reside in .bss and need not occupy .data space.

3 years agoirmp: adjust config for PC library use (32bit, 20kHz, more protocols)
Gerhard Sittig [Sat, 22 Feb 2020 05:44:29 +0000 (06:44 +0100)]
irmp: adjust config for PC library use (32bit, 20kHz, more protocols)

This change enables most IR protocol variants (35 of them), as well as
32bit wide counters, and uses the highest supported samplerate of 20kHz
by default. Which shall result in most reliable detection of protocols
and an appropriate feature set for PC library use.

Provided by: Rene Staffen

3 years agoirmp: silence missing prototype compiler warning
Gerhard Sittig [Sun, 23 Feb 2020 04:49:51 +0000 (05:49 +0100)]
irmp: silence missing prototype compiler warning

The sigrok project enforces warnings when public routines of compile
units lack prototypes. Add a prototype for the irmp.c:print_spectrum()
routine to silence a compiler warning. An alternative would have been to
mark the routine as static (it's exclusively used within the same file).

3 years agoirmp: address unbalanced preprocessor condition (PIC workaround)
Gerhard Sittig [Sat, 22 Feb 2020 05:38:19 +0000 (06:38 +0100)]
irmp: address unbalanced preprocessor condition (PIC workaround)

The #else inside a multi line comment in combination with the excess yet
commented #endif threw off my editor's syntax highlighting and parentheses
matching. Use "#if 0" instead to disable the empty side of ANALYZE macros
which some PIC compilers are said to not support. No change in behaviour.

3 years agoirmp: silence signedness compiler warning in IR command comparison
Gerhard Sittig [Sat, 22 Feb 2020 05:32:40 +0000 (06:32 +0100)]
irmp: silence signedness compiler warning in IR command comparison

Assume that IR command codes can get represented by a C language 'int'
data type. The other value in the comparison is another 'int' anyway.

3 years agoirmp: silence printf(3) format warnings (simple approach)
Gerhard Sittig [Sat, 22 Feb 2020 05:29:16 +0000 (06:29 +0100)]
irmp: silence printf(3) format warnings (simple approach)

Pick low hanging fruit. Stick with the previous implementation's format
specifiers, assume that they work on all platforms which IRMP supports.
Cast arguments to mere integers where necessary instead, again assume
that their range fits as they did in the previous implementation. This
silences several of these compiler warnings:

  irmp.c:3332:25: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat=]
                           ANALYZE_PRINTF ("protocol = NIKON, start bit timings: pulse: %3d - %3d, pause: %3d - %3d\n",
                           ^

3 years agoirmp: introduce sigrok specific README file
Gerhard Sittig [Fri, 28 Feb 2020 14:35:59 +0000 (15:35 +0100)]
irmp: introduce sigrok specific README file

Introduce a separate README-sigrok.txt file, to leave the upstream
project's README.txt file as is. Mention that libsigrokdecode only
contains a subset of the full IRMP project source code.

3 years agoirmp: introduce (part of) upstream IRMP sources
Gerhard Sittig [Sat, 22 Feb 2020 06:20:05 +0000 (06:20 +0000)]
irmp: introduce (part of) upstream IRMP sources

Introduce source files and documentation from the GPL'ed IRMP project.
Commit those files which represent the IRMP core logic (detection of
IR frames), and reference the project's homepage for the remainder.
These files correspond to

  svn://mikrocontroller.net/irmp r191

3 years agoconfigure: add AC_C_CONST to configure.ac
Gerhard Sittig [Sat, 22 Feb 2020 05:09:35 +0000 (06:09 +0100)]
configure: add AC_C_CONST to configure.ac

This is inspired by the autobook sections on Windows DLL builds.
https://www.sourceware.org/autobook/autobook/autobook_137.html

The AC_C_CONST macro improves support for the C language 'const'
decoration in case the compiler does not understand it.

3 years agopjon: comment nits, typo fix
Gerhard Sittig [Fri, 17 Jul 2020 07:16:32 +0000 (09:16 +0200)]
pjon: comment nits, typo fix

3 years agopjdl: support PAD bit adjacent to last HIGH DATA bit (no LOW)
Gerhard Sittig [Fri, 17 Jul 2020 07:17:02 +0000 (09:17 +0200)]
pjdl: support PAD bit adjacent to last HIGH DATA bit (no LOW)

The PJDL decoder's previous implementation was incomplete. It assumed
that PAD bits always start with a rising edge. Which made the decoder
miss the next byte when a previous byte's MSB is set, and the last DATA
bit and the next PAD bit kept the signal HIGH between them (no LOW phase
was seen between these symbols).

Keep the check for the LOW level after the byte's last DATA bit within
the bit times' tolerance. But accept when the level remains HIGH, and
check for the HIGH bit's width starting from the end of the last DATA
bit. Also start the PAD bit's annotation from that "virtual" edge.

This patch is based on a fix that was
Submitted-By: Julio Aguirre <redacted>
3 years agopjon: unbreak CRC32 check, adjust data length
Gerhard Sittig [Fri, 17 Jul 2020 07:12:17 +0000 (09:12 +0200)]
pjon: unbreak CRC32 check, adjust data length

The previous implementation unconditionally assumed a CRC width of
one byte when it calculated the checksum for received frame data.
Do reflect on the CRC8/CRC32 choice instead.

This patch is based on a fix that was
Submitted-By: Julio Aguirre <redacted>
3 years agoeeprom24xx: Add ST M24C32
Thomas Hebb [Mon, 13 Jul 2020 13:56:40 +0000 (15:56 +0200)]
eeprom24xx: Add ST M24C32

3 years agoxy2-100: Add status signal
Soeren Apel [Thu, 9 Jul 2020 22:47:09 +0000 (00:47 +0200)]
xy2-100: Add status signal

3 years agoxy2-100: Rewrite PD for XY2-100E compatibility and features
Soeren Apel [Fri, 10 Jul 2020 18:47:17 +0000 (20:47 +0200)]
xy2-100: Rewrite PD for XY2-100E compatibility and features

3 years agoxy2-100: Initial implementation
Uli Huber [Fri, 10 Jul 2020 18:39:56 +0000 (20:39 +0200)]
xy2-100: Initial implementation

3 years agotiming: user selected scale and sample count for terse display
Gerhard Sittig [Fri, 3 Jul 2020 11:55:04 +0000 (13:55 +0200)]
timing: user selected scale and sample count for terse display

Optionally let users pick the scale for terse timing annotation text.
Which potentially makes numbers show up earlier (at zoom levels of a
further distance). And drops the unit to present mere numbers, which
could speed up navigation during inspection. Keep providing automatic
scaling which then includes the unit text, as it did before.

Extend the automatic scaling to include picoseconds. Which avoids the
fallback to unit-less floating point with uncertain decimals when the
samplerate was 1GHz or higher.

Optionally present distances in terms of sample counts. This supports
decoder development, and can help users spot and judge glitches.

All "terse" presentation so far exclusively affects the 'time' row. It
remains an option for later to migrate averages and deltas as well. For
now it's assumed that high(er) precision and fine grained details are
more important for these rows.

3 years agotiming: break long options lines, rename samples identifier
Gerhard Sittig [Fri, 3 Jul 2020 10:58:40 +0000 (12:58 +0200)]
timing: break long options lines, rename samples identifier

Break text lines in the options declarations which have become rather
long. Rename 'samples' in the main loop to just 'sa', which better
matches the other 'ss', 'es', 't', etc identifers. Separate the code
for unconditional 'time' classes from optional averaging and deltas.

3 years agotiming: only queue when averaging, rephrase put calls
Gerhard Sittig [Fri, 3 Jul 2020 10:33:28 +0000 (12:33 +0200)]
timing: only queue when averaging, rephrase put calls

Reduce the amount of work which the timing decoder needs to do. Only
keep the deque() filled when averaging is active. Rephrase .put() calls
to reduce text line lengths (and for consistency with a pending change).
Move another options lookup for deltas out of the main loop.

3 years agotiming: optional terse format for timing annoations
Gerhard Sittig [Fri, 3 Jul 2020 10:12:40 +0000 (12:12 +0200)]
timing: optional terse format for timing annoations

In some situations (inspecting a dense run of pulses in a burst of data
communication) it takes a lot of zooming before the 'timing' decoder's
'time' annotations start revealing numbers. Which limits the number of
pulses which can fit in the visible trace area.

This is a stab at improving the usability of the timing decoder for
similar "crowded pulses" scenarios. Try to come up with an annotation
text that is shorter yet communicates the very details which the user
needs in this situation. Drop the frequency, avoid umlauts in the unit
text, don't use decimal places (use all integers within a scale). Even
offer to drop the unit text, assuming that a dense run of pulses results
in all times sharing their scale.

Make the terse presentation optional and off by default, and use a
separate annotation class for maximum backwards compatibility.

3 years agotiming: use ss/es for consistency
Gerhard Sittig [Fri, 3 Jul 2020 09:22:03 +0000 (11:22 +0200)]
timing: use ss/es for consistency

Consistently use ss and es identifiers for annotation emission to match
other decoders, as well as counting distances between sample points to
increase readability. This also dramatically reduces text line length.

3 years agotiming: reduce "state", most action is local to .decode()
Gerhard Sittig [Fri, 3 Jul 2020 09:14:31 +0000 (11:14 +0200)]
timing: reduce "state", most action is local to .decode()

Reduce the number of self members, use local variables instead for data
which is strictly kept within a method and need not remain across calls.
Move options dictionary lookups out of the main loop, as the previous
implementation already did with 'edge'.

3 years agotiming: eliminate magic numbers, remove unused variables
Gerhard Sittig [Fri, 3 Jul 2020 08:54:34 +0000 (10:54 +0200)]
timing: eliminate magic numbers, remove unused variables

Use symbolic identifiers for pin numbers and annotation classes. Remove
unused variables.

3 years agopjon: fixup PD category for PJDL and PJON
Gerhard Sittig [Tue, 7 Jul 2020 16:24:06 +0000 (18:24 +0200)]
pjon: fixup PD category for PJDL and PJON

3 years agosae_j1850_vpw: drop the part which duplicates the timing decoder
Gerhard Sittig [Sat, 2 May 2020 13:08:41 +0000 (15:08 +0200)]
sae_j1850_vpw: drop the part which duplicates the timing decoder

The SAE J1850 Variable Pulse Width decoder used to track and annotate
the width of pulses between edges, which duplicates existing features
of the 'timing' decoder. Remove this part from J1850, users can always
connect the input signal to multiple decoders as needed..

Also sort annotation rows while we are here. Top to bottom represents
raw wire bits to highest interpretation layer, as in other decoders.

3 years agosae_j1850_vpw: eliminate magic numbers for annotation class references
Gerhard Sittig [Sat, 2 May 2020 11:16:02 +0000 (13:16 +0200)]
sae_j1850_vpw: eliminate magic numbers for annotation class references

Use symbolic identifiers for annotation classes, to improve readability
and maintainability.

3 years agosae_j1850_vpw: update for API v3, adjust to recent requirements
Gerhard Sittig [Sat, 2 May 2020 13:49:05 +0000 (15:49 +0200)]
sae_j1850_vpw: update for API v3, adjust to recent requirements

IRC user pman92 reported that this decoder exists, and started migration
to the v3 API. This commit completes the migration, and adds missing
decoder infrastructure which has become mandatory recently.

Adjust the boilerplate: Drop FSF postal address. No Python output, add
category tag, unambiguous annotation class and row names. Add reset()
method. Use common code for edge detection.

This commit also addresses minor style nits. Pass the most recent
pulse's edges as ss and es to the data bit handling routine. Adjust
whitespace to unbreak editor navigation and to improve readability.

Use a more verbose name for the decoder, "vpw" appears a little short
and collision happy, and is not found when users search for "j1850".

[ Indentation changed, see whitespace ignoring diff for the essence. ]

Reported-By: pman92 <redacted>
3 years agovpw: introduce SAE J1850 (VPW) decoder
Anthony Symons [Sun, 5 Jun 2016 18:13:00 +0000 (18:13 +0000)]
vpw: introduce SAE J1850 (VPW) decoder

Introduce a protocol decoder for the GM VPW 1x and 4x Vehicle Bus
(SAE J1850, or VPW for variable pulse width).

3 years agopjon: show "communication relations", and nits
Gerhard Sittig [Thu, 2 Jul 2020 19:15:00 +0000 (21:15 +0200)]
pjon: show "communication relations", and nits

Do track the RX and TX information, including their bus IDs. Present bus
numbers as dotted quads. Emit another summary annotation for completed
frames which presents receiver, transmitter, payload, and ACK details at
even higher zoom levels. Rename the last remaining "init CRC" instance
for consistency.

3 years agopjdl: prepare for "stretched" timings
Gerhard Sittig [Thu, 2 Jul 2020 17:12:37 +0000 (19:12 +0200)]
pjdl: prepare for "stretched" timings

Since the spec is vague on the subject, and real world captures were
found to occassionally run on odd clocks, internally prepare to inspect
traffic and interpret its content although the input data is invalid in
the strictest sense. Keep this hack internal, don't suggest to users
that invalid traffic would be perfectly acceptable.

3 years agopjon: use underscore in input/output names for stacked decoders
Gerhard Sittig [Thu, 2 Jul 2020 17:11:31 +0000 (19:11 +0200)]
pjon: use underscore in input/output names for stacked decoders

Rename 'pjon-link' to 'pjon_link' for consistency with other decoders.

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.