summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-11-11parallel: rephrase handling of data lines, symbolic upper boundGerhard Sittig
Strictly speaking this decoder considers all input signals as optional. The previous version accepted clock alone. Though reading values from zero data bits is of limited. Tighten the check for connected inputs. Inline the declaration of all channels in the decoder boiler plate, the helper routine was only used in a single spot. Change the order of the data lines stripe details and the .wait() conditions, improve locality of assignment and use of related variables. Don't assume that "all channels but clock" are data lines. Use a symbolic upper bound for the data lines partition, to prepare the introduction of a reset/enable signal.
2020-11-07parallel: symbolic names for pins and annotation classesGerhard Sittig
Concentrate tunables at the top of the source code. Eliminate magic numbers by replacing them with symbolic identifiers.
2020-08-31irmp: Fix a build issue with xtensa cross toolchains.Uwe Hermann
2020-08-30ir_nec: fix typo in STOP bit widthGerhard Sittig
The 0.652ms STOP bit width must have been a typo (though consistent in the previous implementation), it's not half of the 1.125ms ZERO symbol. Notice that this is an incompatible change to the decoder implementation. It affects the annotations for STOP bits and overall REMOTE button codes.
2020-08-30ir_nec: sort and comment timing specs, drop tolerance optionGerhard Sittig
Extend comments on the IR NEC timing details. Sort the symbols by their width to reflect their relation (ONE to ZERO to STOP is each half of their predecessor's width). Increase the open coded tolerance percentage, and remove the option for the value. Make sure leader and repeat codes still can be told from each other.
2020-08-30ir_nec: concentrate timing at the top of the source fileGerhard Sittig
Move IR NEC protocol timing details to the top of the source file, for raised awareness and easier adjustment. Specs are "unit-less" (only have comments), but are scaled for improved readability. Values are copies of the previous implementation.
2020-08-30ir_nec: Add option for automatic polarity detectionBenediktO
Provide an option to have the decoder automatically detect the IR signal's polarity. Stick with active-low by default for backwards compatibility, because this auto-detect implementation assumes that the capture starts with an idle phase. [ gsi: rephrased message and implementation, auto-detect off by default ]
2020-08-30ir_nec: Make the tolerance configurableBenediktO
Provide an option to adjust the IR NEC decoder's tolerance. Which makes signals accessible that are generated by cheap remotes which would not decode at all with the previous implementation and its fixed limit. [ gsi: rephrased commit message and implementation ]
2020-08-30ir_nec: Annotate IR frame already at the end of the STOP bitBenediktO
Emit annotations for the current IR frame as soon as possible, at the very end of the STOP bit. Don't defer annotation emission until the start of the next frame is seen. This unbreaks captures where the last IR frame would not decode before. [ gsi: rephrased commit message, updated comment in the implementation ]
2020-08-30ir_nec: Add Joy-it SBC-IRC01 remoteBenediktO
The Joy-it SBC-IRC01 remote control appears as address 0x00.
2020-08-30sle44xx: support memory read "to end of capacity"Gerhard Sittig
Assume a maximum memory capacity, currently open coded, could become a user servicable option when needed. Automatically flush the accumulated outgoing data when a memory read reaches address 256. Drop the unconditional START condition check now that it became obsolete.
2020-08-30sle44xx: optionally use samplerate to show processing durationsGerhard Sittig
The protocol is clocked, so strictly does not depend on the samplerate. When the samplerate is available, the duration of internal processing (memory erase and write) can get annotated. It's an optional feature. The datasheet suggests that write and erase time are in the range of a few milliseconds. Normalize to ms units and provide 10us resolution.
2020-08-30sle44xx: extend decoder's feature set, outgoing data, processingGerhard Sittig
Rephrase how the decoder's progress during data interpretation gets tracked. Extend the set of .wait() conditions in the main loop, and determine START/STOP conditions and BIT validity there already, which reduces redundancy with called handlers. Increase the decoder's coverage of the memory card's feature set and constraints. Handle the optional CLK during RST, to tell interrupted memory access from card reset. Interpret known command codes, to present their meaning and arguments to users, and to tell "outgoing data" (the card's memory content) from "internal processing" (providing clock until the card signals completion of a write access). Get initial statistics on internal processing (clock count, and terminal I/O level, no duration in units of wall clock time yet). Unfortunately there is no reliable condition to detect the end of a memory read when it executes to the end of the memory card's capacity. That's why START detection is more greedy than specified, to reliably re-sync to subsequent commands and their byte sequences. Arrange for an improved set of annotation rows with symbols (bit level), fields (data bytes), and operations details (summary of memory access including protection). Rename the binary output. It carries "any bytes" which were seen, the command bytes as well as response data bytes.
2020-08-30sle44xx: rephrase ss/es passing for annotation emissionGerhard Sittig
Coupling the logic which interprets input signals at different levels and the helpers which emit annotations by means of "global" variables (public members of the decoder object) is unfortunate. It complicates the logic, adds unnecessary dependencies, and makes maintenance rather tedious and error prone. Pass ss/es times to put() routines the same way as annotation classes and annotation texts are passed. This simplifies the logic where bits and bytes levels and additional rows are handled. The data values and their spans all become local information that gets determined in the same context. Which dramatically simplifies review.
2020-08-30sle44xx: minor developer comment and style nitsGerhard Sittig
These are just nits, behaviour remains. The comment may be incorrect how command and data modes are detected. Add a developer comment for later revisit. Drop unneeded parentheses in a ternary operation, and move an ATR related comment around.
2020-08-30sle44xx: don't assume RESET at the start of the captureGerhard Sittig
The decoder cannot know the state of the input signal before the start of the capture. Assuming the RESET state results in incorrect output for data bits which we don't know the context of. Start from unknown state instead until a reliable condition is seen to synchronize to.
2020-08-30sle44xx: rework data bits accumulation, and byte presentationGerhard Sittig
The 'databyte' is strictly local to the routine when 8 bits were seen. The 'bitcount' is redundant and becomes obsolete when bits[] is a Python list. The comment and the code disagreed, the wire is said to communicate bits in LSB first order, the implemenation kept accumulating bits in the reverse order (the annotation part, not the data byte math). Prefer the common helper to convert bits to bytes. There is uncertainty about the bit width "estimation" logic. The main loop's .wait() conditions suggest that data bit values are valid for the period of high CLK, which provides an easier and more robust condition for annotation boundaries. Add a comment for now. The order of bit and byte values' annotation emission is unfortunate, too.
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).