summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-08-30sle44xx: rephrase annotation text constructionGerhard Sittig
Concentrate all text variants for zoom levels in a single spot. Remove duplicates, and on the other hand add more verbose phrases to support users which are not intimately familiar with the protocol. Prefer the Python strings .format() method over the % operator for its versatility and readability.
2020-08-30sle44xx: use symbolic identifiers for annotation classesGerhard Sittig
Eliminate magic numbers for annotation classes, prefer symbolic names instead to improve readability. Put the annotation classes in an order which matches the annotation rows' order. Reduce indentation in the 'proto' table while we are here (yet keep the vertical alignment).
2020-08-30sle44xx: use symbolic identifiers for pins and signal transitionsGerhard Sittig
Eliminate magic numbers for input pins and signal transition conditions. Which dramatically improves readability and simplifies review.
2020-08-30sle44xx: remove incomplete Python output for nowGerhard Sittig
The current implementation exclusively communicated the 'RESET' condition but nothing else. Remove the Python output from the decoder, it's easy to re-introduce when a complete implementation materializes. There also is no known recipient of SLE44xx Python output right now which would expect to see even the currently implemented subset.
2020-08-30sle44xx: extend decoder doc string, add "memory cards" hintGerhard Sittig
Add a stronger hint to "memory cards", users might expect to see this detail in the decoder's description. Rephrase how the reset line will terminate pending memory reads.
2020-08-30sle44xx: fixup boilerplate, add missing required fieldsGerhard Sittig
The decoder was created in an older setup and would not load in recent applications. Add missing boilerplate which is mandatory. Rename 'data' since annotation classes and rows must not have ambiguous names, and there is no singular form of 'data' -- use 'fields' instead. This also fixes a missing line termination at the end of the text file.
2020-08-30sle44xx: introduce decoder for Siemens memory cardsFederico Cerutti
Introduce an initial implementation of the SLE44xx protocol decoder for Siemens/Infineon SLE 4418/28/32/42 memory cards. ATR (Answer To Reset), command and data bytes get displayed, and RESET/abort events are marked. Extracted data bytes are made available as binary output.
2020-08-16avr_isp: Extend decoder, add locks, eeprom, program memory commands.Helge Kruse
[ gsi: list all classes, break long lines, EEPROM address calculation ]
2020-08-16avr_isp: move "unknown command" to warning, drop empty 'bits' rowGerhard Sittig
Use the warnings annotation class for the "Unknown command" message, the PE class (programming enabled) is unexpected and most probably a typo. Drop the empty 'bits' annotation row which has been unused since commit 3b0013416fcfb.
2020-08-16avr_isp: Use symbolic names for annotation classes.Helge Kruse
[ gsi: explicit list of all classes in row declaration ]
2020-08-12sdq: prefer Python's .format() method for string formattingGerhard Sittig
Prefer the .format() method over the % operator. Also vertically align the non-trivial text alternatives for different zoom levels to simplify comparison and adjustment during maintenance.
2020-08-12sdq: use symbolic names for pins and annotation classesGerhard Sittig
Eliminate magic numbers which are too hard to read and too easy to get wrong during maintenance. Prefer symbolic identifiers instead for pins and annotation classes.
2020-08-12sdq: provide more information in the decoder's boilerplateGerhard Sittig
Extend the __init__.py module's doc string. Provide more details to the user beyond the vendor's name, to increase the decoder's usability.
2020-08-12sdq: simplify decode routine, no state machine requiredGerhard Sittig
Move the initial synchronization to the input data out of the main loop, and handle the BREAK symbol when it was seen. Turns out that no state machine is required to decode the SDQ protocol. [ best viewed as a whitespace ignoring diff ]
2020-08-12sdq: only use samplerate and options values after validity checkGerhard Sittig
Move the calculation which involves the samplerate as well as user provided options out of the meta packet reception and to the top of the decode() method. Especially only use the samplerate after it was tested for availability.
2020-08-12sdq: use common bits to number conversionGerhard Sittig
2020-08-12sdq: Add the SDQ protocol decoderPhilip Åkesson
[ gsi: minor whitespace adjustment ]
2020-08-09st7735: Fix handling of unknown commandsgregor-anich-uibk
Command lookup for unknown codes resulted in an exception instead of the 'else' clause which was ineffective. Make the check non-fatal. [ gsi: rephrased commit message ]
2020-08-05configure.ac: Add support for Python 3.9.Dan Horák
2020-07-31lpc: improve performance, use proper .wait() conditionBenediktO
Use a proper .wait() condition to have edges detected in common code, and avoid the many transitions between C and Python. This dramatically increases performance of the LPC protocol decoder. [ gsi: rephrased and reflowed the commit message ]
2020-07-30st25r39xx_spi: Minor style and description changesSoeren Apel
2020-07-30st25r39xx_spi: Add st25r39xx PD using spibvernoux
This NFC interface chip is used in the HydraNFC Shield v2. See also dumps used to validate it on https://github.com/sigrokproject/sigrok-dumps/pull/21
2020-07-30lfast/sipi: Fix typoSoeren Apel
2020-07-29sipi: Initial version of the SIPI protocol to form a Zipwire stackSoeren Apel
2020-07-29lfast: More bug fixes and enhancementsSoeren Apel
2020-07-29lfast: Enhance LFAST PDSoeren Apel
2020-07-29lfast: Initial version of the NXP LFAST / IFX HSCT PDSoeren Apel
2020-07-26ir_sirc: use common bitpack() variant with array accessGerhard Sittig
This eliminates array copies and indexed access to bit values in the calling decoder. Prefer common helpers instead.
2020-07-26can: use common MSB first variant of bitpack()Gerhard Sittig
This eliminates array copies and bit order reversal in the calling decoder. Prefer common helpers instead.
2020-07-26common: add LSB/MSB first bitpack variant with optional indexGerhard Sittig
The CAN decoder collects bits in MSB first order. The SIRC decoder keeps lists of tuples with bits and their ss/es. Introduce common logic for LSB and MSB first arguments, and optional array index access, to reduce redundancy at callers'.
2020-07-26can: avoid assignment to .id field during frame inspectionGerhard Sittig
The CAN frame's ID field gets stored in an .id member, which is unfortunate. Use .ident instead. The 'id' identifier is a Python language word, though it's used for PD boilerplate as well. Assume that the boilerplate is worth keeping, and harder to adjust (more dependencies), so adjust this PD's implementation to resolve the ambiguity.
2020-07-26can: use common helper for bits to number conversionGerhard Sittig
Eliminate repeated local string manipulation for the purpose of number conversion from bits input. Prefer the common helper instead (is an MSB first variant desirable to simplify call sites more?).
2020-07-26can: amend recently added Python output featureGerhard Sittig
Adjust nits in the previous commit which added Python output to the CAN decoder. Rename the routine to .putpy() for consistency with other PDs. Avoid the 'bytes' identifier as it ships with Python as a data type. Rephrase the construction of the tuple for Python output, to become more explicit and help reviewers. Partially "undo" the rtr rename, to reduce diffs to the previous version (see diff HEAD~2 to see the essence). Fix up a three space indentation issue (which was there before the addition of Python output).
2020-07-26can: enable Python output from decoderKari Hautio
2020-07-26ir_nec: improve robustness, present more data on invalid inputGerhard Sittig
Don't terminate IR frame inspection when successfully decoded fields fail the validity check. Reset internal state on long periods of idle level instead (beware of the late detection of the STOP condition). Unconditionally annotate received fields, and optionally amend them with a warning annotation. It's unexpected to not see the address field value at all just because the number was not acceptable for the potentially incorrect protocol selection. Rename a variable in the decode() routine. The 'b' identifier suggested a bit value, but it was used for the pulse width.
2020-07-25ir_nec: Add button texts for an unknown LED panel remoteSebastian Rittau
The remote is unmarked and belongs to a 60x60cm LED panel. There is a total of 8 buttons. It's probably some generic remote control. Bought here: https://www.lumizil.de/led-deckenleuchte-panel-60x60cm
2020-07-25ir_nec: add support for extended NEC protocol (16bit address)Gerhard Sittig
Add support for the extended NEC protocol, where the address field spans 16 bits and the complement is not sent. Commands still span 8 bits and are sent in normal and in inverted form. The user needs to select the extended protocol (off by default for compatibility), the input data does not allow automatic detection of the protocol variant. It's also not appropriate to assume the extended format when the address field happens to fail the validity check. The unfortunate mix of data value checks and annotation emission in combination with "global" state makes this implementation more redundant than I would like. A later cleanup is desirable. This resolves bug #1583.
2020-07-25ir_nec: use common helper for bit accumulationGerhard Sittig
The input signal's polarity ('active' variable) is strictly local to the decode() method. The 'count' becomes obsolete when 'data' is kept in a Python list. Conversion of bit patterns to numbers is provided by common helpers. Alpha-sort Python imports while we are here. This commit also renames a few variables in the normal/inverted check for valid input data. Which can help the introduction of support for the extended protocol, by decoupling what gets checked and what gets shown.
2020-07-25ir_nec: rephrase button lookup and addr/cmd validity checksGerhard Sittig
Eliminate redundancy in the check for database entries of button events. Tighten the check for valid address and command bit patterns. The former implementation did something unexpected, wanted the AND of the first and second 8bit patterns to become zero. But the second 8bit item has not yet become available when the test runs after the reception of the first 8bit item. So the test happened to "pass" unexpectedly in intermediate steps, and failed to catch invalid input data when all fields became available. Unfortunately the check for valid data and the emission of annotations was combined in the implementation. So it's essential to keep running the "check" routine to get the annotations, and update internal ss/es state. But only emit warnings when the check fails after all involved data became available. Check for strict XOR as per the protocol spec.
2020-07-25ir_nec: only use the samplerate after receiving the valueGerhard Sittig
The metadata() method unconditionally referenced the samplerate even though the value is only available conditionally. Move the references to a location after the samplerate presence check.
2020-07-25ir_nec: rephrase annotation logic, symbolic names, format() callGerhard Sittig
Eliminate magic numbers, use symbolic names for annotation classes and pin numbers. Also vertically align text variants for zoom levels in the more complex cases, to simplify maintenance. Prefer .format() calls to improve readability in the more complex invocations.
2020-07-22ir_sirc: minor Python and other nitsGerhard Sittig
The .wait() wrapper always receives Python lists. There is only a single IR pin (and its value isn't even used anywhere because appropriate edge conditions get constructed). There is a delicate ss/es detail in the .decode() routine concerning the IR frame's annotation's start. Don't "continue" in the loop body's last statement, just "pass" and continue.
2020-07-22ir_sirc: symbolic names for IR pulse widths, more line trimmingGerhard Sittig
Concentrate the magic numbers for IR pulse widths at the top of the source file. Drop more unused variables. Rename others to shorten more text lines.
2020-07-22ir_sirc: use symbolic identifiers for annotation classesGerhard Sittig
2020-07-22ir_sirc: reduce smarts to improve maintenance (.wait() API change)Gerhard Sittig
Eliminate redundancy in time to snum conversions and vice versa. Don't locally overload .wait() with unexpected semantics and neither change its parameters nor return values. Give reviewers and maintainers a chance to see what's happening when they inspect call sites. The 'signals' identifier is unusual for pin states, use the more common 'pins' instead for consistency with other decoders. Reflect when return values are not used, so that readers need to juggle fewer details in their head.
2020-07-22ir_sirc: use ss/es for consistency with other decodersGerhard Sittig
2020-07-22ir_sirc: .put() nits, common helpers, whitespaceGerhard Sittig
Wrap the .put() routine which eliminates redundancy and shortens a few code lines. Vertically align text variants for different zoom levels. Prefer common helpers for bit accumulation which eliminates a local copy of that feature. Address minor whitespace nits, alpha-sort imports.
2020-07-22ir_sirc: fixup decoder boilerplateGerhard Sittig
The SIRC decoder was written to an older API, and failed to load in a recent environment (tag missing, ambiguous annotation names). Unbreak the decoder's boilerplate, and address other nits while we are here: There is no Python output. Use the same declaration syntax as in other decoders for improved maintenance (greppability). Call reset() from __init__() to avoid surprises when a future version does have vars. Do provide a doc string in the module initialization, to keep the URL for the protocol description at hand.
2020-07-22ir_sirc: introduce decoder for Sony IR remote control protocolTom Flanagan
2020-07-20spdif: Simplify samplerate check.Uwe Hermann