libsigrokdecode.git
3 years agoFactor out srd_decoder_apiver().
Uwe Hermann [Thu, 25 Aug 2016 20:22:07 +0000 (22:22 +0200)]
Factor out srd_decoder_apiver().

3 years agosrd_inst_decode(): Improve comments and log messages.
Uwe Hermann [Thu, 25 Aug 2016 20:01:04 +0000 (22:01 +0200)]
srd_inst_decode(): Improve comments and log messages.

Also, drop @since tag (as the function is not public).

3 years agosrd_session_send(): Improve Doxygen comments.
Uwe Hermann [Thu, 25 Aug 2016 19:57:39 +0000 (21:57 +0200)]
srd_session_send(): Improve Doxygen comments.

3 years agossi32: Slightly more descriptive naming.
Uwe Hermann [Tue, 23 Aug 2016 18:07:54 +0000 (20:07 +0200)]
ssi32: Slightly more descriptive naming.

3 years agomidi: Substantially improve decoding of MIDI messages.
Chris Dreher [Fri, 19 Aug 2016 17:26:02 +0000 (10:26 -0700)]
midi: Substantially improve decoding of MIDI messages.

 * Decode note names and percussion names (ex: 'G2', 'Tambourine').
 * Decode instrument names and drum_kit names (ex: 'Flute', 'GS Orchestra Kit').
 * Handle Polyphonic Pressure / Aftertouch (message 0xAn).
 * Handle Program Change (message 0xCn).
 * Handle Channel Pressure / Aftertouch (message 0xDn).
 * Handle Channel Mode (message 0xBn mm where mm is 120 through 127).
 * Handle System Common messages (message 0xF1 through 0xF6), including
   full time code decoding.
 * SysEx decoding now decodes the 1-3 byte manufacturer field, payload
   is now displayed as hex.
 * 'undefined' fields now display the value (ex: 'undefined 0xf4').
 * Add 'MSB' and 'LSB' to many control_functions entries.
 * Fix "trapped in state X" bug with handle_channel_msg_generic(),
   though this might be dead code.
 * Fix bug in sysex_manufacturer_ids; 1-byte manufacturers were not
   tuples due to missing comma.
 * Fix bug in SysEx decoding state machine; 0xF7 now sent to handle_sysex_msg().

3 years agossi32: Minor cosmetics, add full license header (for consistency).
Uwe Hermann [Sun, 21 Aug 2016 22:16:49 +0000 (00:16 +0200)]
ssi32: Minor cosmetics, add full license header (for consistency).

3 years agoAdd Bosch SSI32 protocol decoder.
Oleksij Rempel [Sun, 21 Aug 2016 21:08:57 +0000 (23:08 +0200)]
Add Bosch SSI32 protocol decoder.

Signed-off-by: Oleksij Rempel <fixed-term.Oleksij.Rempel@de.bosch.com>
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
4 years agoAdd a DMX512 protocol decoder
cbdev [Wed, 29 Jun 2016 16:39:10 +0000 (18:39 +0200)]
Add a DMX512 protocol decoder

4 years agotiming: Add frequency and averaging support.
Uwe Hermann [Tue, 28 Jun 2016 20:23:09 +0000 (22:23 +0200)]
timing: Add frequency and averaging support.

This patch was contributed by James Sleeman <james@gogo.co.nz>, thanks!

4 years agospiflash: Add a 'format' option.
Uwe Hermann [Wed, 22 Jun 2016 20:16:09 +0000 (22:16 +0200)]
spiflash: Add a 'format' option.

4 years agospiflash: Perf tweak: Build handler lookup table once per decoder
Angus Gratton [Sun, 22 May 2016 01:47:57 +0000 (11:47 +1000)]
spiflash: Perf tweak: Build handler lookup table once per decoder

4 years agospiflash: Handle "Fast Read Dual I/O"
Angus Gratton [Sun, 22 May 2016 01:43:45 +0000 (11:43 +1000)]
spiflash: Handle "Fast Read Dual I/O"

4 years agospiflash: Handle CS# transitions, allow variable-length transfers
Angus Gratton [Sun, 22 May 2016 01:42:52 +0000 (11:42 +1000)]
spiflash: Handle CS# transitions, allow variable-length transfers

4 years agoConsistency renames of {ss,es}_ variables.
Uwe Hermann [Thu, 19 May 2016 16:38:05 +0000 (18:38 +0200)]
Consistency renames of {ss,es}_ variables.

4 years agoMove common/ directory into decoders/.
Uwe Hermann [Tue, 24 May 2016 19:42:02 +0000 (21:42 +0200)]
Move common/ directory into decoders/.

This simplifies cross-platform handling of the Python/decoder paths
and module installation/dist a bit and also fixes bug #804.

4 years agoAdd decoder for em4305 RFID protocol
Benjamin Larsson [Wed, 11 May 2016 18:40:54 +0000 (20:40 +0200)]
Add decoder for em4305 RFID protocol

4 years agoUse consistent __init__() format across all PDs.
Uwe Hermann [Sun, 15 May 2016 13:42:48 +0000 (15:42 +0200)]
Use consistent __init__() format across all PDs.

The previous **kwargs some PDs had is not actually ever used, so drop it.

4 years agousb_request: Drop hardcoded samplerate.
Uwe Hermann [Wed, 11 May 2016 16:55:13 +0000 (18:55 +0200)]
usb_request: Drop hardcoded samplerate.

The libsigrokdecode backend now passes metadata (e.g. samplerate) to all
PDs, stacked and non-stacked (see bug #664), so this interim solution is no
longer needed.

4 years agoSupply metadata to stacked decoders
Stefan Brüns [Sat, 3 Oct 2015 14:26:23 +0000 (16:26 +0200)]
Supply metadata to stacked decoders

Currently only toplevel decoders receive the samplerate, thus stacked
decoders are not able to derive e.g. timestamps from the sample number.

This fixes bug #664.

4 years agowiegand: Make bitwidth_ms option values integer (not string).
Uwe Hermann [Wed, 11 May 2016 16:39:02 +0000 (18:39 +0200)]
wiegand: Make bitwidth_ms option values integer (not string).

4 years agoAdd wiegand decoder.
Sean Burford [Tue, 10 May 2016 07:25:21 +0000 (17:25 +1000)]
Add wiegand decoder.

4 years agoConsistently use ' instead of " for strings in all PDs.
Uwe Hermann [Wed, 4 May 2016 17:15:06 +0000 (19:15 +0200)]
Consistently use ' instead of " for strings in all PDs.

4 years agoFactor out SD card lists into common/sdcard.
Uwe Hermann [Thu, 5 May 2016 17:56:58 +0000 (19:56 +0200)]
Factor out SD card lists into common/sdcard.

These are used by the sdcard_spi and sdcard_sd decoders.

4 years agoFactor out bcd2int() into common/srdhelper.
Uwe Hermann [Wed, 4 May 2016 17:56:40 +0000 (19:56 +0200)]
Factor out bcd2int() into common/srdhelper.

4 years agoHave one subdirectory per module in common/ as well.
Uwe Hermann [Wed, 4 May 2016 17:35:18 +0000 (19:35 +0200)]
Have one subdirectory per module in common/ as well.

This is consistent with decoders/, conveniently allows for more than one
file per module, and also happens to avoid some import warnings.

4 years agoMove constants out of xfp to common/plugtrx.
Bert Vermeulen [Wed, 20 Apr 2016 23:44:10 +0000 (01:44 +0200)]
Move constants out of xfp to common/plugtrx.

4 years agoAdd common directory for shared modules.
Bert Vermeulen [Wed, 20 Apr 2016 23:33:49 +0000 (01:33 +0200)]
Add common directory for shared modules.

4 years agomdio: Add 'TURNAROUND' long/full annotation.
Uwe Hermann [Wed, 4 May 2016 01:42:24 +0000 (03:42 +0200)]
mdio: Add 'TURNAROUND' long/full annotation.

(useful in GUIs for displaying more useful annotations at certain
zoom levels)

4 years agomdio: Factor out self.putff().
Uwe Hermann [Wed, 27 Apr 2016 20:17:01 +0000 (22:17 +0200)]
mdio: Factor out self.putff().

4 years agoAdd an MDIO protocol decoder.
Elias Oenal [Mon, 18 Apr 2016 15:37:07 +0000 (17:37 +0200)]
Add an MDIO protocol decoder.

This new implementation supports all the features of the old decoder,
and additionally supports Clause 22 and 45.

4 years agoDrop mdio decoder (to be replaced with another implementation).
Uwe Hermann [Wed, 27 Apr 2016 16:50:37 +0000 (18:50 +0200)]
Drop mdio decoder (to be replaced with another implementation).

4 years agopwm: Use self.{ss,es}_block for consistency across PDs.
Uwe Hermann [Wed, 20 Apr 2016 17:31:38 +0000 (19:31 +0200)]
pwm: Use self.{ss,es}_block for consistency across PDs.

4 years agotiming: Use self.samplenum for consistency across PDs.
Uwe Hermann [Wed, 20 Apr 2016 17:31:21 +0000 (19:31 +0200)]
timing: Use self.samplenum for consistency across PDs.

4 years agoAdd initial Renesas Advanced User Debugger (AUD) decoder.
fenugrec [Wed, 9 Mar 2016 20:36:06 +0000 (15:36 -0500)]
Add initial Renesas Advanced User Debugger (AUD) decoder.

4 years agoem4100/t55xx: Fix accidentally broken wording in license header.
Uwe Hermann [Fri, 4 Mar 2016 07:20:08 +0000 (08:20 +0100)]
em4100/t55xx: Fix accidentally broken wording in license header.

The word "version" was accidentally replaced by "data" (sed).

4 years agoFix various incorrect PD license metadata fields.
Uwe Hermann [Fri, 4 Mar 2016 07:13:30 +0000 (08:13 +0100)]
Fix various incorrect PD license metadata fields.

Have the PD 'license' attribute match what the license header of the
respective pd.py file actually says.

4 years agoAdd an rgb_led_ws281x decoder.
Uwe Hermann [Sun, 14 Feb 2016 21:06:38 +0000 (00:06 +0300)]
Add an rgb_led_ws281x decoder.

This decoder handles the WS2812B protocol (and possibly WS2811).

Example dump already exists: led/ws281x/ws281x_4ch_5mhz.sr.

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>
4 years agoAdd decoder for the t55xx RFID protocol
Benjamin Larsson [Sun, 24 Jan 2016 22:49:55 +0000 (23:49 +0100)]
Add decoder for the t55xx RFID protocol

4 years agoconfigure.ac: Bump package version to 0.5.0.
Uwe Hermann [Thu, 3 Mar 2016 17:37:30 +0000 (18:37 +0100)]
configure.ac: Bump package version to 0.5.0.

0.5.0 will be the next major, API-changing release. Bump now, so that
there is no confusion of tarball 0.4.0 and 0.5.0-git snapshots.

4 years agoBump libtool version (not package version) to 3:0:0.
Uwe Hermann [Fri, 29 Jan 2016 22:32:37 +0000 (23:32 +0100)]
Bump libtool version (not package version) to 3:0:0.

The last release (0.3.0) had the libtool version (current:revision:age)
set to 2:0:0. Since this release removes and changes interfaces, the new
version is 3: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.2.0.0 to libsigrokdecode.so.3.0.0, the SONAME
(+symlink) becomes libsigrokdecode.so.3.

4 years agoNEWS: Update for upcoming 0.4.0 release.
Uwe Hermann [Fri, 29 Jan 2016 20:25:18 +0000 (21:25 +0100)]
NEWS: Update for upcoming 0.4.0 release.

4 years agoconfigure.ac: Also check for Python 3.5.
Martijn van Buul [Tue, 26 Jan 2016 21:13:26 +0000 (22:13 +0100)]
configure.ac: Also check for Python 3.5.

This fixes bug #739.

4 years agouart: Optimize handling of samples when tx and rx are both idle
Daniel Thompson [Fri, 22 Jan 2016 08:29:09 +0000 (08:29 +0000)]
uart: Optimize handling of samples when tx and rx are both idle

Re-enable the fast path for identical samples but only when both
pins are waiting for the start bit. For sparse data sets (I tested
UT61E capture log) the optimization results in a >4x decode
improvement.

4 years agoarm_itm: Use objdump instead of addr2line.
Petteri Aimonen [Sun, 10 Jan 2016 17:23:55 +0000 (19:23 +0200)]
arm_itm: Use objdump instead of addr2line.

This improves speed and fixes bug 564. Code is somewhat
of a copypaste from the arm_etm counterpart, but there
are enough differences that it is easier to keep separate
copy of the objdump parsing in each.

4 years agousb_power_delivery: Raise SamplerateError instead of Exception.
Uwe Hermann [Fri, 25 Dec 2015 15:28:23 +0000 (16:28 +0100)]
usb_power_delivery: Raise SamplerateError instead of Exception.

(for consistency with the other PDs)

4 years agoUse self.out_binary naming consistently across all PDs.
Uwe Hermann [Wed, 23 Dec 2015 19:01:48 +0000 (20:01 +0100)]
Use self.out_binary naming consistently across all PDs.

4 years agoUse a Python list (not tuple) for OUT_BINARY.
Uwe Hermann [Wed, 23 Dec 2015 19:00:45 +0000 (20:00 +0100)]
Use a Python list (not tuple) for OUT_BINARY.

This is more consistent with annotation syntax and looks slightly
better in most cases.

4 years agoDrop obsolete support for annotation tuples (only support lists).
Uwe Hermann [Sun, 20 Dec 2015 16:49:31 +0000 (17:49 +0100)]
Drop obsolete support for annotation tuples (only support lists).

None of the PDs use this.

4 years agoem4100: Simplify the code a bit.
Uwe Hermann [Fri, 18 Dec 2015 16:42:16 +0000 (17:42 +0100)]
em4100: Simplify the code a bit.

4 years agoem4100: Use ss/es naming for consistency across PDs.
Uwe Hermann [Fri, 18 Dec 2015 16:29:10 +0000 (17:29 +0100)]
em4100: Use ss/es naming for consistency across PDs.

4 years agoem4100: Eliminate some unnecessary int()s.
Uwe Hermann [Fri, 18 Dec 2015 16:21:47 +0000 (17:21 +0100)]
em4100: Eliminate some unnecessary int()s.

4 years agoem4100: Change annotation setup a bit, decode more protocol details.
Uwe Hermann [Fri, 18 Dec 2015 17:14:06 +0000 (18:14 +0100)]
em4100: Change annotation setup a bit, decode more protocol details.

4 years agoAdd RFID EM4100 protocol decoding
Benjamin Larsson [Tue, 15 Dec 2015 00:00:01 +0000 (01:00 +0100)]
Add RFID EM4100 protocol decoding

4 years agousb_power_delivery: Use "if not self.samplerate" form.
Uwe Hermann [Wed, 16 Dec 2015 17:14:30 +0000 (18:14 +0100)]
usb_power_delivery: Use "if not self.samplerate" form.

Use the "if not self.samplerate" form, which catches both the case
where self.samplerate is None, as well as the case where it is 0.

This is also consistent with all the other PDs.

4 years agousb_power_delivery: convert double quotes to single quotes
Vincent Palatin [Wed, 25 Nov 2015 17:19:58 +0000 (09:19 -0800)]
usb_power_delivery: convert double quotes to single quotes

For consistency with other decoders, convert all the double quotes around
strings to single quotes.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
4 years agoinit: Don't let Python override signal handlers
Marcus Comstedt [Fri, 4 Dec 2015 21:36:17 +0000 (22:36 +0100)]
init: Don't let Python override signal handlers

This fixes bug #461.

4 years agousb*: Minor cosmetics.
Uwe Hermann [Fri, 4 Dec 2015 21:11:14 +0000 (22:11 +0100)]
usb*: Minor cosmetics.

4 years agousb_signalling: detect PREamble PID
Stefan Brüns [Tue, 1 Dec 2015 05:44:43 +0000 (06:44 +0100)]
usb_signalling: detect PREamble PID

PID decoding is normally done in the packet layer, but the signalling
layer has to switch behaviour on detection of an PREamble PID.

4 years agousb_signalling: add signaling states needed after LS PREamble PID
Stefan Brüns [Tue, 1 Dec 2015 05:48:02 +0000 (06:48 +0100)]
usb_signalling: add signaling states needed after LS PREamble PID

4 years agousb_{packet,request}: handle PREamble transmissions
Stefan Brüns [Tue, 1 Dec 2015 04:53:32 +0000 (05:53 +0100)]
usb_{packet,request}: handle PREamble transmissions

4 years agousb_signalling: fix SOP detection after an error condition
Stefan Brüns [Sun, 29 Nov 2015 23:35:11 +0000 (00:35 +0100)]
usb_signalling: fix SOP detection after an error condition

If the oldsym is not set to 'J' before entering IDLE state, the SOP
detection will never trigger

4 years agousb_packet: handle errors from usb_signalling
Stefan Brüns [Sun, 29 Nov 2015 23:00:03 +0000 (00:00 +0100)]
usb_packet: handle errors from usb_signalling

If a packet had any errors, the usb_signalling PD will not send an EOP
but an ERR message. Wait for the next SOP in both cases.

4 years agousb_request: Handle transmission timeouts
Stefan Brüns [Sun, 29 Nov 2015 22:56:53 +0000 (23:56 +0100)]
usb_request: Handle transmission timeouts

If a device or host did not receive a handshake 18 bit times after the
EOP, there was a transmission error and the host may repeat the
transmission

4 years agousb_signalling: add option to automatically set signalling speed
Stefan Brüns [Fri, 13 Nov 2015 06:15:36 +0000 (07:15 +0100)]
usb_signalling: add option to automatically set signalling speed

In automatic mode, the bus is assumed to be in IDLE state. After a
RESET, the bus state is checked again.

4 years agousb_signalling: decode RESET and Keep-Alive signalling conditions
Stefan Brüns [Fri, 13 Nov 2015 04:39:10 +0000 (05:39 +0100)]
usb_signalling: decode RESET and Keep-Alive signalling conditions

Resets are at least 10ms at the root hub downstream facing port and
2.5us at the device (root hub reset may be shortened by itermediate
hubs).
Keep-alive is a low-speed only signalling condition, as low-speed has no
SOFs to inhibit devices to enter suspend

4 years agousb_signalling: use explicit positions for packet start/end
Stefan Brüns [Fri, 13 Nov 2015 04:20:22 +0000 (05:20 +0100)]
usb_signalling: use explicit positions for packet start/end

Instead of centering the block around the sampleposition, which shows
some visual glitches due to rounding, use the edge positions already
known. Remove unused halfbit symbol.

4 years agousb_signalling: handle symbol errors in EOP state
Stefan Brüns [Fri, 13 Nov 2015 03:55:56 +0000 (04:55 +0100)]
usb_signalling: handle symbol errors in EOP state

Only SE0 and J are valid symbols during EOP

4 years agousb_signalling: remove unneeded syms array
Stefan Brüns [Fri, 13 Nov 2015 03:52:53 +0000 (04:52 +0100)]
usb_signalling: remove unneeded syms array

Do not call get_eop() from get_bit(), but directly issue the symbol. As
get_eop() is only called during the GET EOP state, the SE0 is implicit and
there is no need to save it into the syms array.

4 years agousb_signalling: remove unused ss_sop member
Stefan Brüns [Fri, 13 Nov 2015 03:20:54 +0000 (04:20 +0100)]
usb_signalling: remove unused ss_sop member

4 years agousb_signalling: detect bit stuffing errors
Stefan Brüns [Fri, 13 Nov 2015 03:11:37 +0000 (04:11 +0100)]
usb_signalling: detect bit stuffing errors

More than six consecutive 1's are an error

4 years agousb_signalling: consolidate symbol output
Stefan Brüns [Fri, 13 Nov 2015 03:05:24 +0000 (04:05 +0100)]
usb_signalling: consolidate symbol output

No need to replicate the symbol formatting in several places

4 years agospi: Add a 'TRANSFER' output type.
Paul "LeoNerd" Evans [Sun, 8 Nov 2015 00:49:08 +0000 (00:49 +0000)]
spi: Add a 'TRANSFER' output type.

4 years agoFix documentation comment in SPI decoder
Paul "LeoNerd" Evans [Sat, 7 Nov 2015 23:39:59 +0000 (23:39 +0000)]
Fix documentation comment in SPI decoder

4 years agousb_power_delivery: Minor typo and whitespace fixes.
Uwe Hermann [Sat, 21 Nov 2015 19:18:47 +0000 (20:18 +0100)]
usb_power_delivery: Minor typo and whitespace fixes.

4 years agousb_power_delivery: Use the same license header format as other PDs.
Uwe Hermann [Sat, 21 Nov 2015 18:35:15 +0000 (19:35 +0100)]
usb_power_delivery: Use the same license header format as other PDs.

4 years agoUSB Power Delivery protocol decoder
Vincent Palatin [Thu, 29 May 2014 13:51:13 +0000 (06:51 -0700)]
USB Power Delivery protocol decoder

Decode and packetize the Biphase Mark Coding (aka differential Manchester)
as used in the Universal Serial Bus Power Delivery Specification Revision 2.0
v1.1, then decode the packet content.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
4 years agospiflash: Fix incorrect 'inputs' field.
Uwe Hermann [Sat, 21 Nov 2015 17:43:06 +0000 (18:43 +0100)]
spiflash: Fix incorrect 'inputs' field.

(this PD is indeed stacked on top of SPI)

4 years agoInitial attempt at MAX7219/MAX7221 decoder
Paul "LeoNerd" Evans [Tue, 3 Nov 2015 14:02:11 +0000 (14:02 +0000)]
Initial attempt at MAX7219/MAX7221 decoder

4 years agosrd_decoder_unload(): Remove PD from the internal list.
Uwe Hermann [Tue, 3 Nov 2015 01:12:49 +0000 (02:12 +0100)]
srd_decoder_unload(): Remove PD from the internal list.

This issue was discovered via the newly added unit tests.

4 years agotests/decoder.c: Add some srd_decoder_unload*() tests.
Uwe Hermann [Tue, 3 Nov 2015 01:12:29 +0000 (02:12 +0100)]
tests/decoder.c: Add some srd_decoder_unload*() tests.

4 years agoUART: Handle framing errors better
Elrond [Wed, 21 Oct 2015 14:17:19 +0000 (16:17 +0200)]
UART: Handle framing errors better

1. Show Frame Error on the Start bit
2. Don't overwrite framing errors with (valid) start/stop bit info

4 years agoexception: Decorate catch function with format attribute
Daniel Elstner [Tue, 6 Oct 2015 20:42:52 +0000 (22:42 +0200)]
exception: Decorate catch function with format attribute

4 years agobuild: Require GLib 2.28.0
Daniel Elstner [Tue, 6 Oct 2015 19:08:36 +0000 (21:08 +0200)]
build: Require GLib 2.28.0

This is needed for e.g. g_slist_free_full(), which incidentally
has been in use for a while already.

4 years agoutil: Factor out Python module load
Daniel Elstner [Tue, 6 Oct 2015 20:30:14 +0000 (22:30 +0200)]
util: Factor out Python module load

Create a utility function for loading a Python module by its name
in UTF-8.

4 years agodecoder: Refactor loading code and plug leaks
Daniel Elstner [Tue, 6 Oct 2015 19:07:47 +0000 (21:07 +0200)]
decoder: Refactor loading code and plug leaks

4 years agoPython: Restrict code to stable ABI subset
Daniel Elstner [Sun, 4 Oct 2015 23:53:43 +0000 (01:53 +0200)]
Python: Restrict code to stable ABI subset

Limit usage of the Python C API to the stable ABI subset as defined
by PEP 384. This removes some type definitions and functions which
libsigrokdecode made use of. Convert all affected code to suitable
API alternatives. Also fix a few leaks that became apparent while
working on the code.

The most visible change is that PyTypeObject is now an opaque type.
Thus, the custom Decoder and srd_logic types are now created on the
heap via an alternative API. Unfortunately, since tp_name is now
inaccessible, type names had to be removed from the log output.

Stack traces after Python exceptions are now formatted by calling
into Python, since the trace object C API is no longer available.

4 years agousb_request: USB transaction decoder and PCAP generator
Stefan Brüns [Sat, 3 Oct 2015 22:43:38 +0000 (00:43 +0200)]
usb_request: USB transaction decoder and PCAP generator

The new decoder stacks on top of the usb_packet PD. It adds one new
annotation row, and is able to save the decoded data as PCAP trace.

It has been successfully tested against all traces in sigrok-dumps and
some more traces.

4 years agousb_packet: Document CRC5 ERROR and CRC16 ERROR packets.
Uwe Hermann [Tue, 6 Oct 2015 06:29:56 +0000 (08:29 +0200)]
usb_packet: Document CRC5 ERROR and CRC16 ERROR packets.

4 years agousb_{signalling,packet}: Minor cosmetics.
Uwe Hermann [Tue, 6 Oct 2015 06:28:03 +0000 (08:28 +0200)]
usb_{signalling,packet}: Minor cosmetics.

4 years agousb_signalling: Track USB symbol width to compensate frequency errors
Stefan Brüns [Tue, 29 Sep 2015 22:24:24 +0000 (00:24 +0200)]
usb_signalling: Track USB symbol width to compensate frequency errors

USB low/full speed allows for frequency tolerance of 1.5%/0.25%. At
maximum packet size (sync + PID + data + CRC16) of 12 bytes/1027 bytes
this amounts to 1.4 bits/20 bits, so the decoder has to lock to the
actual symbol frequency to avoid any symbol misdetections.

The signal is sampled twice, once at the symbol center and once at
the expected edge position. Comparing the symbol at both positions gives
an indication if the current bit width is too low or too high. Adjust
accordingly.

4 years agousb_packet: calculate and check CRC5/CRC16
Stefan Brüns [Wed, 30 Sep 2015 22:12:29 +0000 (00:12 +0200)]
usb_packet: calculate and check CRC5/CRC16

In case CRC validation fails, an crc5-err/crc16-err annotation is issued,
instead of crc5-ok/crc16-ok, and the error is noted in the annotation
text.

4 years agorfm12: fix small typo
Roland Hieber [Sun, 4 Oct 2015 21:04:02 +0000 (23:04 +0200)]
rfm12: fix small typo

There is a small typo in the rfm12 protocol decoder that I just noticed:

4 years agotests: Do not reference parent directory in includes
Daniel Elstner [Sat, 3 Oct 2015 12:28:43 +0000 (14:28 +0200)]
tests: Do not reference parent directory in includes

Rely on the compiler include path instead.

4 years agotests: Rename DECODERS_DIR to DECODERS_TESTDIR
Daniel Elstner [Sat, 3 Oct 2015 12:21:01 +0000 (14:21 +0200)]
tests: Rename DECODERS_DIR to DECODERS_TESTDIR

Avoid confusion resulting from using the same macro name for
different purposes.

4 years agobuild: Do not hard-code decoders location on Windows
Daniel Elstner [Sat, 3 Oct 2015 12:17:07 +0000 (14:17 +0200)]
build: Do not hard-code decoders location on Windows

4 years agoinit: Also look for decoders in XDG data directories
Daniel Elstner [Sat, 3 Oct 2015 11:18:09 +0000 (13:18 +0200)]
init: Also look for decoders in XDG data directories

4 years agoinit: Simplify srd_decoder_searchpath_add()
Daniel Elstner [Sat, 3 Oct 2015 09:40:33 +0000 (11:40 +0200)]
init: Simplify srd_decoder_searchpath_add()

Don't mess with colon-separated search path strings -- instead,
simply prepend items to the sys.path list object. Also keep the
internal decoder path list in the same order as the items added
to sys.path.

4 years agojitter, pwm: Avoid Unicode string literals
Daniel Elstner [Tue, 15 Sep 2015 09:42:05 +0000 (11:42 +0200)]
jitter, pwm: Avoid Unicode string literals

It seems the Python we ship along our Windows binaries does not
support u"..." strings, even though it's been a language feature
since Python 2. Remove the "u" prefix to avoid a syntax error.

Also, consistently use format "%.1f" at all scales.

This fixes bug #569.

4 years agocan: Improve stuff bit annotation placement.
Uwe Hermann [Mon, 14 Sep 2015 17:05:54 +0000 (19:05 +0200)]
can: Improve stuff bit annotation placement.

4 years agocan: Emit bit value annotations.
Uwe Hermann [Mon, 14 Sep 2015 16:25:02 +0000 (18:25 +0200)]
can: Emit bit value annotations.