summaryrefslogtreecommitdiff
path: root/decoders
AgeCommit message (Collapse)Author
2017-12-22usb_power_delivery: fixup a Python style nit (dict lookup fallback)Gerhard Sittig
Use the dictionary's .get() method in combination with a default result parameter, instead of an explicit "k in dictvar" test and a conditional assignment.
2017-12-22usb_power_delivery: enforce numerical order of RDO/PDO flag annotationsGerhard Sittig
Annotations of the USB power delivery decoder contain multiple text fragments that correspond to several flags in bit fields. The Python runtime did not guarantee an order of emission and made the test suite fail. Sort the order in which RDO and PDO flags related text fragments get constructed and concatenated. Print text for higher bit positions first as this might feel more intuitive to users. This fixes part of bug #1090.
2017-12-22all decoders: introduce a reset() methodGerhard Sittig
Move initialization code of protocol decoders from the constructor to a new reset() helper method. The libsigrokdecode backend could run this method several times to clear the decoder's internal state, before new data from another acquisition gets fed to decode() calls.
2017-12-22ssi32: rename reset() helper methodGerhard Sittig
The ssi32 decoder implements a reset() method which clears internally accumulated data during decoding. Rename the method before all decoders will grow a new reset() method that will be used for a different purpose.
2017-12-22mrf24j40: rename reset() helper methodGerhard Sittig
The mrf24j40 decoder implements a reset() method which clears internally accumulated data during decoding. Rename the method before all decoders will grow a new reset() method that will be used for a different purpose.
2017-12-22ade77xx: rename reset() helper methodGerhard Sittig
The ade77xx decoder implements a reset() method which clears internally accumulated data during decoding. Rename the method before all decoders will grow a new reset() method that will be used for a different purpose.
2017-12-22sdcard_sd: remove unused .reset() methodGerhard Sittig
The decoder's .reset() method seems to partially implement constructor's assignments, but is not referenced anywhere. There is neither a direct call site in the remainder of pd.py which uses the "reset" name, and runtime computation only references "handle_*()" methods for commands and responses. Drop the unused .reset() method in the individual decoder before the introduction of a common .reset() method approach for all decoders.
2017-12-22am230x: rename reset() helper methodGerhard Sittig
The am230x decoder implements a reset() method which clears internal decoder state. Rename the method before all decoders will grow a new reset() method that will be used for a different purpose.
2017-12-22eeprom 24xx: rename reset() helper methodGerhard Sittig
2017-12-17ir_nec: Make timing margin relativeGrant Miller
This replaces the fixed timing margin with a percentage based tolerance to better allow for timing inaccuracies, especially for longer timings like the Leader and Repeat codes.
2017-12-09graycode: Move bitpack/bitunpack to common/.Uwe Hermann
2017-12-09Add a gray code and rotary encoder protocol decoder.Christoph Rackwitz
2017-12-09Add a morse code protocol decoder.Christoph Rackwitz
2017-12-09i2s: Fix unportable use of struct.packMarcus Comstedt
Using the format string 'I' with the default (implied) prefix '@' results in both word size and endianness being platform dependent. In this case standard size (32 bits) and little endianness is required, so the prefix '<' needs to be used.
2017-12-09maple_bus: Add helpers to make the call sites a bit shorter.Uwe Hermann
2017-12-09Add an initial Maple bus decoder.Marcus Comstedt
2017-11-11i2s: Set file size to 4GbJoel Holdsworth
2017-11-11i2s: Make 32-bit wav filesJoel Holdsworth
2017-11-02ds243x: Add binary output for data read from EEPROMSoeren Apel
2017-11-02Rename ds2432 to ds243xSoeren Apel
2017-11-02ds2432: Adapt to allow for DS2433 as wellSoeren Apel
2017-10-19ds2432: Simplify MAC printing.Uwe Hermann
2017-10-19ds2432: Add a Maxim DS2432 protocol decoder.Kevin Redon
This fixes (parts of) bug #1019.
2017-07-22usb_request: Remove code duplication, save end sample in central locationStefan Brüns
2017-07-22usb_request: Handle CONTROL transfer protocol stallsStefan Brüns
According to the USB 2.0 spec, 8.5.3.4, a protocol stall condition lasts until the next SETUP transfer. On reception of the SETUP, adjust the end sample accordingly, and flush the previous CONTROL transfer.
2017-07-04can: introduce clock synchronization (simple implementation)Gerhard Sittig
Check for falling edges (i.e. changes to dominant state) between bits of a CAN frame, and adjust subsequent bit slots' sample points accordingly. This is a simple implementation which could get improved later. But it improves the decoder's reliability when the input signal's rate differs from the nominal rate. This fixes bug #990. Reported-By: PeterMortensen via IRC
2017-07-04can: rename 'bitpos' variableGerhard Sittig
Consistently use .sample_point for the member variable that corresponds to the 'sample_point' property. Use 'samplenum' in .get_sample_point() to reflect that the routine returns a sample number. This eliminates the 'bitpos' identifier which was used for two different things.
2017-06-21pwm: Drop unused 'pins' variable.Uwe Hermann
2017-06-21ir_rc5: Rephrase open coded value for start bit 1Gerhard Sittig
Make obvious that the start bit's value is 1 in the IDLE stage.
2017-06-21lpc: Improve robustness when decoding unexpected input dataGerhard Sittig
The 'fields' table of state and descriptions is not fully populated, some slots are missing. Cope with lookup misses when unexpected input data is not found in the table. Use different error text in annotations for described but invalid states (the previous implementation used "reserved / invalid"), and for states that are not described in the table (introduce the "reserved / unknown" text for conditions that are not covered by the decoder implementation). The previous implementation missed the emission of some warnings. When a "reserved / invalid" description was found, the subsequent exact match for "reserved" failed and the warning was not emitted. Weaken the test to emit warnings for either description that has "reserved" in it, regardless of whether the text was found in the table or is not part of the table at all.
2017-06-21lpc: Nit, remove an unused variableGerhard Sittig
2017-06-21onewire_network: Fixup start samplenumber for annotationsGerhard Sittig
Annotations generated by the onewire_network decoder started where bit 1 began, while it should align with the start of bit 0.
2017-06-21guess_bitrate: Eliminate internal state of the decoderGerhard Sittig
Getting the first edge outside of the loop in .decode() greatly simplifies the logic, any other edge then is just an update of the previously collected data, determined by always equal code.
2017-06-21i2c: Don't drop the first sample of input dataGerhard Sittig
The previous implementation of the I2C decoder used to retrieve and not process the first sample of the input stream. Remove this instruction.
2017-06-21decoders: Rephrase condition-less .wait() calls (self documentation)Gerhard Sittig
Telling .wait() to "skip one sample" slightly obfuscates the intent of getting the next samples while no condition applies. Explicitly pass no condition arguments instead, to better reflect the purpose. Coincidently these .wait() calls will execute in slightly less expensive code paths in the common code.
2017-06-20usb_signalling: Move another edge detection to common backend codeGerhard Sittig
Rephrase how the 'WAIT IDLE' stage skips over all-low input signals. Have the next high level on either line detected in common code.
2017-06-20pwm: Fixup sample numbers for binary outputGerhard Sittig
Do reference the period's start and end sample numbers when the duty cycle is written to the binary output stream. The previous implementation inappropriately used the period counter instead.
2017-06-20pwm: Eliminate more decoder "state"Gerhard Sittig
Move more items from the Python object's members to local variables of the decode() method, as they are used there exclusively. Mark a spot where the binary output references suspicious "sample numbers".
2017-06-20pwm: Rephrase edge and period detection, eliminate internal stateGerhard Sittig
With the simplicity of PWM waveforms and the convenience of the v3 API, there is no need to maintain internal state. After the start of the first period was determined based on the input signal's polarity, any period is defined by just the next two edges, and the next period is immediately to follow.
2017-06-16Mark all stacked decoders as being PD API version 3.Uwe Hermann
This is not really relevant for stacked PDs currently (they can be used unmodified with either PDv2 or PDv3 low-level decoders), but it'll allow us to drop PDv2 support completely.
2017-06-16ir_rc5: Convert to PD API version 3.Uwe Hermann
2017-06-16dsi: Convert to PD API version 3.Uwe Hermann
2017-06-16dsi: Cosmetics, drop obsolete comments.Uwe Hermann
2017-06-16rgb_led_ws281x: Convert to PD API version 3.Uwe Hermann
2017-06-16lpc: Convert to PD API version 3.Uwe Hermann
2017-06-16wiegand: Convert to PD API version 3.Gerhard Sittig
2017-06-16usb_signalling: Convert to PD API version 3.Uwe Hermann
2017-06-16dali: Change 'self.dali' to 'dali'.Uwe Hermann
2017-06-16dali: Convert to PD API version 3.Uwe Hermann
2017-06-16dali: Random cleanups, remove obsolete comments.Uwe Hermann