summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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-09-22srd_init(): Print list of decoder search paths in debug output.Uwe Hermann
2017-09-06Clarify and improve channel map debug output.Uwe Hermann
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-06Fix a unit test.Uwe Hermann
Only try to acquire the GIL if the Python interpreter is actually initialized, otherwise there'll be a segfault.
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-30self.put(): Eliminate an unneeded malloc/free pair.Uwe Hermann
2017-06-30Acquire/release the Python GIL where needed to avoid threading issues.Uwe Hermann
With these additions, frontends can now call libsigrokdecode API functions from different threads without running into threading issues. The backend releases the GIL when it is performing tasks that might take a while and it doesn't need to run Python/C API calls during that time. This allows frontends to run multiple PD stacks (in multiple frontend threads) "at the same time" in a time-sharing, "interlocked" manner. Whenever one of the decoders is inside e.g. self.wait() it releases the GIL and thus allows other decoders to do some work in the mean time. The user-visible effect is that for use-cases such as running 3 different decoder stacks at the same time for an acquisition, the user will not have to wait for PD 1 to finish decoding, then wait for PD 2 to finish decoding, and only *then* being able to see annotations from PD 3. Instead, all three PDs will decode some chunks of data from time to time, thus the user is able to inspect annotations from all 3 PDs while the acquisition and decoding is still going on.
2017-06-21HACKING: Prefer git pull requests over mailing list patches.Uwe Hermann
Also, drop the reference to gitorious.org (no longer available).
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-21decoder: Accept more forms of "unconditional wait()" (None, no args)Gerhard Sittig
The Decoder.wait() method expects a list of dicts, or as a special form a single dict, to specify the conditions to wait for. An empty dict or an empty list mean "unconditional wait", requesting the very next sample. Accept None as well as no arguments at all in Decoder.wait() calls. This shall better reflect the intent and slightly unobfuscate PD code, as well as avoid creation of potentially expensive Python objects at the call site.
2017-06-21decoder: Unbreak execution of Decoder.wait() with empty conditionGerhard Sittig
The Decoder.wait() method works as expected when non-empty conditions are specified by the caller. For empty conditions the implementation was incomplete, and ended up in an infinite loop because the sample number got stuck in the current location. Code review revealed more issues like not getting more input data chunks when needed. Detect when empty wait() conditions were specified, and re-use existing code paths for match handling as much as possible. This is achieved by the manual creation of a SKIP term with the appropriate count value. It's assumed that naive decoder implementations will run this kind of condition-less query for every individual sample, which means that efficiency is important. Make sample number 0 available to condition-less calls, too. Don't skip the first sample in the input stream.
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-16Drop support for PD API version 2.Uwe Hermann
All decoders must be of PD API version 3 now.
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
2017-06-16instance.c: Drop a few unneeded checks.Uwe Hermann
2017-06-16spi: Simplify some code chunks.Uwe Hermann
2017-06-15dmx512: Use a nicer 'dmx' pin name variable.Uwe Hermann
2017-06-15dmx512: Convert to PD API version 3.Uwe Hermann
2017-06-15pwm: Reduce indentation level.Uwe Hermann
2017-06-15pwm: Simplify waiting for initial edge.Uwe Hermann
2017-06-15session.c: Fix a compiler warning on Mac OS X.Uwe Hermann
session.c:203:22: warning: format specifies type 'unsigned long long' but the argument has type 'guint64' (aka 'unsigned long') [-Wformat] sess->session_id, g_variant_get_uint64(data)); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ libsigrokdecode-internal.h:103:44: note: expanded from macro 'srd_dbg' #define srd_dbg(...) srd_log(SRD_LOG_DBG, __VA_ARGS__) ^~~~~~~~~~~
2017-06-15configure.ac: Bump package version to 0.6.0.Uwe Hermann
0.6.0 will be the next major release. Bump now, so that there is no confusion of tarball 0.5.0 and 0.6.0-git snapshots.
2017-06-12Bump libtool version (not package version) to 4:0:0.Uwe Hermann
The last release (0.4.0) had the libtool version (current:revision:age) set to 3:0:0. Since this release removes and changes interfaces, the new version is 4:0:0. http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info This changes the library filename (e.g. on Linux) from libsigrokdecode.so.3.0.0 to libsigrokdecode.so.4.0.0, the SONAME (+symlink) becomes libsigrokdecode.so.4.
2017-06-12NEWS: Add list of user-visible changes so far.Uwe Hermann