libsigrokdecode.git
13 months agoDecoder for Xicor X2444M, nonvolatile static RAM.
Stefan Petersen [Wed, 31 Oct 2018 13:27:44 +0000 (14:27 +0100)]
Decoder for Xicor X2444M, nonvolatile static RAM.

13 months agodecoder: consider reset() a mandatory decoder method
Gerhard Sittig [Sun, 21 Oct 2018 15:14:59 +0000 (17:14 +0200)]
decoder: consider reset() a mandatory decoder method

In theory support for PD reset is optional, applications are not
required to make use of it. But it's essential to receive correct
decoding results when used with the popular Pulseview mainline
application.

So let's consider the absence of the reset() method fatal. All mainline
decoders have it. Out-of-tree decoders are easy to adjust, and very
probably should support reset() as well. Thus this change is considered
beneficial, and not harmful.

13 months agomiller: add reset() method
Gerhard Sittig [Sun, 21 Oct 2018 19:25:34 +0000 (21:25 +0200)]
miller: add reset() method

13 months agolin: Simplify state handling a bit.
Uwe Hermann [Sun, 21 Oct 2018 17:43:10 +0000 (19:43 +0200)]
lin: Simplify state handling a bit.

13 months agolin: handle_break(): Use self.putx().
Uwe Hermann [Sun, 21 Oct 2018 17:30:32 +0000 (19:30 +0200)]
lin: handle_break(): Use self.putx().

13 months agolin: Simplify LinFsm._transition_allowed().
Uwe Hermann [Sun, 21 Oct 2018 17:28:31 +0000 (19:28 +0200)]
lin: Simplify LinFsm._transition_allowed().

13 months agoadd LIN protocol decoder
stephan.thiele [Wed, 17 Oct 2018 09:40:23 +0000 (11:40 +0200)]
add LIN protocol decoder

13 months agospiflash: Remember write protection latch from status registers
Vesa-Pekka Palmu [Wed, 17 Oct 2018 22:57:28 +0000 (01:57 +0300)]
spiflash: Remember write protection latch from status registers

13 months agospiflash: Bugfix: WRSR was using miso for register decode
Vesa-Pekka Palmu [Wed, 17 Oct 2018 22:56:26 +0000 (01:56 +0300)]
spiflash: Bugfix: WRSR was using miso for register decode

13 months agospiflash: Initial support for write enable state tracking
Vesa-Pekka Palmu [Wed, 17 Oct 2018 15:49:29 +0000 (18:49 +0300)]
spiflash: Initial support for write enable state tracking

13 months agospiflash: Handle chip erase
Vesa-Pekka Palmu [Wed, 17 Oct 2018 12:53:35 +0000 (15:53 +0300)]
spiflash: Handle chip erase

Minimal implementation of chip erase 0x60 and 0xc7 command handling

13 months agospiflash: Add Winbond W25Q80DV metadata.
Uwe Hermann [Sun, 21 Oct 2018 15:32:57 +0000 (17:32 +0200)]
spiflash: Add Winbond W25Q80DV metadata.

13 months agoFix GVariant memory leaks in session test code
Jon Burgess [Sun, 14 Oct 2018 18:11:21 +0000 (19:11 +0100)]
Fix GVariant memory leaks in session test code

==187759== 88 (40 direct, 48 indirect) bytes in 1 blocks are definitely lost in loss record 2,262 of 3,218
==187759==    at 0x4C2EBAB: malloc (vg_replace_malloc.c:299)
==187759==    by 0x563C435: g_malloc (in /usr/lib64/libglib-2.0.so.0.5600.3)
==187759==    by 0x5654056: g_slice_alloc (in /usr/lib64/libglib-2.0.so.0.5600.3)
==187759==    by 0x5673630: g_variant_new_from_bytes (in /usr/lib64/libglib-2.0.so.0.5600.3)
==187759==    by 0x566C5E6: ??? (in /usr/lib64/libglib-2.0.so.0.5600.3)
==187759==    by 0x566C7D2: g_variant_new_uint64 (in /usr/lib64/libglib-2.0.so.0.5600.3)
==187759==    by 0x403D41: conf_check_fail.constprop.6 (session.c:152)
==187759==    by 0x403E06: test_session_metadata_set_bogus (session.c:215)
==187759==    by 0x53E51D5: srunner_run_tagged (in /usr/lib64/libcheck.so.0.0.0)
==187759==    by 0x401237: main (main.c:51)

13 months agoFix memory leak in decoder test code
Jon Burgess [Sun, 14 Oct 2018 18:10:16 +0000 (19:10 +0100)]
Fix memory leak in decoder test code

==187724== 917 bytes in 1 blocks are definitely lost in loss record 3,046 of 3,207
==187724==    at 0x4C2EBAB: malloc (vg_replace_malloc.c:299)
==187724==    by 0x563C435: g_malloc (in /usr/lib64/libglib-2.0.so.0.5600.3)
==187724==    by 0x5655D82: g_strdup (in /usr/lib64/libglib-2.0.so.0.5600.3)
==187724==    by 0x4E43937: py_str_as_str (util.c:371)
==187724==    by 0x4E415E1: srd_decoder_doc_get (decoder.c:892)
==187724==    by 0x40281D: test_doc_get (decoder.c:395)
==187724==    by 0x53E51D5: srunner_run_tagged (in /usr/lib64/libcheck.so.0.0.0)
==187724==    by 0x401237: main (main.c:51)

13 months agoFix memory leak in print_searchpaths()
Jon Burgess [Sun, 14 Oct 2018 17:55:47 +0000 (18:55 +0100)]
Fix memory leak in print_searchpaths()

==175453== 522 bytes in 8 blocks are definitely lost in loss record 2,923 of 3,201
==175453==    at 0x4C2EBAB: malloc (vg_replace_malloc.c:299)
==175453==    by 0x59E9BB5: PyObject_Malloc (in /usr/lib64/libpython3.6m.so.1.0)
==175453==    by 0x5A35A76: PyBytes_FromStringAndSize (in /usr/lib64/libpython3.6m.so.1.0)
==175453==    by 0x4E3FA6E: print_searchpaths (srd.c:173)
==175453==    by 0x4E3FA6E: srd_init (srd.c:287)
==175453==    by 0x4034BE: test_session_reset_nodata (session.c:238)
==175453==    by 0x53E51D5: srunner_run_tagged (in /usr/lib64/libcheck.so.0.0.0)
==175453==    by 0x401237: main (main.c:51)

13 months agoFix bad memory accesses during srd_exit()
Jon Burgess [Sun, 14 Oct 2018 17:49:52 +0000 (18:49 +0100)]
Fix bad memory accesses during srd_exit()

When the decoder and session unload functions are called they
remove themselves from the list. The code walking the list
must be careful to avoid accessing the next pointer which
might now be invalid. The g_slist_foreach() takes care of
this.

Reports from Valgrind before fix:

==175436== Invalid read of size 8
--
==175436==  Address 0xe3f2598 is 8 bytes inside a block of size 16 free'd
==175436==    at 0x4C2FDAC: free (vg_replace_malloc.c:530)
==175436==    by 0x563C541: g_free (in /usr/lib64/libglib-2.0.so.0.5600.3)
==175436==    by 0x5654783: g_slice_free1 (in /usr/lib64/libglib-2.0.so.0.5600.3)
==175436==    by 0x56552A2: g_slist_remove (in /usr/lib64/libglib-2.0.so.0.5600.3)
==175436==    by 0x4E3FEFF: srd_session_destroy (session.c:343)
==175436==    by 0x4E3F5C7: srd_exit (srd.c:311)
==175436==    by 0x40336F: test_inst_new (inst.c:40)
==175436==    by 0x53E51D5: srunner_run_tagged (in /usr/lib64/libcheck.so.0.0.0)
==175436==    by 0x401237: main (main.c:51)
==175436==  Block was alloc'd at
==175436==    at 0x4C2EBAB: malloc (vg_replace_malloc.c:299)
==175436==    by 0x563C435: g_malloc (in /usr/lib64/libglib-2.0.so.0.5600.3)
==175436==    by 0x5654056: g_slice_alloc (in /usr/lib64/libglib-2.0.so.0.5600.3)
==175436==    by 0x5655797: g_slist_append (in /usr/lib64/libglib-2.0.so.0.5600.3)
==175436==    by 0x4E3FC75: srd_session_new (session.c:71)
==175436==    by 0x403345: test_inst_new (inst.c:37)
==175436==    by 0x53E51D5: srunner_run_tagged (in /usr/lib64/libcheck.so.0.0.0)
==175436==    by 0x401237: main (main.c:51)

13 months agoUpdate a few Doxygen @since tags.
Uwe Hermann [Sun, 14 Oct 2018 22:16:51 +0000 (00:16 +0200)]
Update a few Doxygen @since tags.

Drop @since tags for non-public functions.

13 months agoinstance.c: Avoid 4 unneeded forward declarations.
Uwe Hermann [Sun, 14 Oct 2018 22:09:41 +0000 (00:09 +0200)]
instance.c: Avoid 4 unneeded forward declarations.

13 months agouart: add support for break condition detection
Gerhard Sittig [Sun, 14 Oct 2018 18:17:35 +0000 (20:17 +0200)]
uart: add support for break condition detection

There are the "traffic inspecting" wait() conditions, which check an
edge to find the start of START, then wait for sample points to grab the
bit values. Bit times are sampled in their respective center, potential
glitches around sample points get ignored.

Add another independent set of wait() conditions which check _all_ edges
regardless of any data communication. This results in the most reliable
and maintainable detection of break conditions, regardless of how they
align to data frames. Break is defined as a period of low input signal
which spans at least one frame's length. Run the edge inspection after
data inspection, which results in the most appropriate annotation output
like leading data bits (of incomplete frames), frame errors (violated
STOP bit expectations), then break conditions. This approach is most
robust in the presence of incomplete input streams.

14 months agoook: Fix two typos which affect the decoding results.
Uwe Hermann [Sat, 13 Oct 2018 15:49:04 +0000 (17:49 +0200)]
ook: Fix two typos which affect the decoding results.

14 months agoVarious log message improvements.
Uwe Hermann [Fri, 12 Oct 2018 23:29:03 +0000 (01:29 +0200)]
Various log message improvements.

14 months agolog: Use human-readable output type name everywhere.
Uwe Hermann [Fri, 12 Oct 2018 23:02:30 +0000 (01:02 +0200)]
log: Use human-readable output type name everywhere.

14 months agoinstance.c: Make oldpins_array_*() static.
Uwe Hermann [Fri, 12 Oct 2018 22:53:22 +0000 (00:53 +0200)]
instance.c: Make oldpins_array_*() static.

14 months agoDecoder_put(): Add more info to OTUPUT_PYTHON log messages.
Uwe Hermann [Fri, 12 Oct 2018 22:49:06 +0000 (00:49 +0200)]
Decoder_put(): Add more info to OTUPUT_PYTHON log messages.

14 months agosrd.c: Fix a compiler warning with gcc 8.
Uwe Hermann [Sat, 6 Oct 2018 13:57:49 +0000 (15:57 +0200)]
srd.c: Fix a compiler warning with gcc 8.

  srd.c: In function ‘srd_searchpaths_get’:
  srd.c:399:40: warning: cast between incompatible function types from ‘gchar * (*)(const gchar *)’ {aka ‘char * (*)(const char *)’} to ‘void * (*)(const void *, void *)’ [-Wcast-function-type]
    return g_slist_copy_deep(searchpaths, (GCopyFunc)g_strdup, NULL);
                                          ^

Upstream glib issue / documentation change:
https://gitlab.gnome.org/GNOME/glib/issues/1492
https://gitlab.gnome.org/pwithnall/glib/commit/e81f4c2acea5ada6ae989426e462613f7c612cac

14 months agotype_decoder.c: Fix trailing whitespace.
Uwe Hermann [Sat, 6 Oct 2018 13:39:53 +0000 (15:39 +0200)]
type_decoder.c: Fix trailing whitespace.

15 months agomorse: fix for #1278
Christoph Rackwitz [Tue, 11 Sep 2018 19:55:38 +0000 (21:55 +0200)]
morse: fix for #1278

15 months agoook_vis: Minor code simplifications.
Uwe Hermann [Tue, 11 Sep 2018 19:44:40 +0000 (21:44 +0200)]
ook_vis: Minor code simplifications.

15 months agoook_oregon: Minor code simplifications.
Uwe Hermann [Tue, 11 Sep 2018 19:42:56 +0000 (21:42 +0200)]
ook_oregon: Minor code simplifications.

15 months agoook: Minor code simplifications.
Uwe Hermann [Tue, 11 Sep 2018 19:35:16 +0000 (21:35 +0200)]
ook: Minor code simplifications.

15 months agoadded ook_vis
Steve R [Sun, 10 Jun 2018 17:27:37 +0000 (18:27 +0100)]
added ook_vis

15 months agoadded ook_oregon
Steve R [Sun, 10 Jun 2018 17:24:28 +0000 (18:24 +0100)]
added ook_oregon

15 months agoadded ook
Steve R [Mon, 10 Sep 2018 16:21:19 +0000 (17:21 +0100)]
added ook

15 months agomiller: Minor description/whitespace fixes.
Uwe Hermann [Mon, 10 Sep 2018 20:10:40 +0000 (22:10 +0200)]
miller: Minor description/whitespace fixes.

15 months agoatsha204a: Add missing full stop in description.
Uwe Hermann [Mon, 10 Sep 2018 20:07:45 +0000 (22:07 +0200)]
atsha204a: Add missing full stop in description.

15 months agomiller: Add missing 'binary' meta-data.
Uwe Hermann [Sun, 9 Sep 2018 17:18:02 +0000 (19:18 +0200)]
miller: Add missing 'binary' meta-data.

15 months agoMiller encoding PD
Christoph Rackwitz [Mon, 6 Aug 2018 02:48:06 +0000 (04:48 +0200)]
Miller encoding PD

15 months agocec: Drop uneeded self.set_stat().
Uwe Hermann [Sun, 9 Sep 2018 15:38:43 +0000 (17:38 +0200)]
cec: Drop uneeded self.set_stat().

15 months agocec: Replace unneeded decode_opcode().
Uwe Hermann [Sun, 9 Sep 2018 15:35:55 +0000 (17:35 +0200)]
cec: Replace unneeded decode_opcode().

15 months agocec: Simplify a few code snippets.
Uwe Hermann [Sun, 9 Sep 2018 15:31:04 +0000 (17:31 +0200)]
cec: Simplify a few code snippets.

15 months agoAdd HDMI CEC protocol decoder.
Jorge Solla [Sun, 2 Sep 2018 20:01:33 +0000 (22:01 +0200)]
Add HDMI CEC protocol decoder.

15 months agousb_power_delivery: Whitespace/consistency cosmetics.
Uwe Hermann [Sun, 9 Sep 2018 14:06:59 +0000 (16:06 +0200)]
usb_power_delivery: Whitespace/consistency cosmetics.

All annotation classes/rows have all-lowercase IDs.

Also fix a few minor whitespace/consistency issues.

15 months agousb_power_delivery: Drop currently unused self.out_python.
Uwe Hermann [Sun, 9 Sep 2018 13:55:06 +0000 (15:55 +0200)]
usb_power_delivery: Drop currently unused self.out_python.

15 months agousb_power_delivery: Drop non-existing max_w for now.
Uwe Hermann [Sun, 9 Sep 2018 13:20:50 +0000 (15:20 +0200)]
usb_power_delivery: Drop non-existing max_w for now.

15 months agousb_power_delivery: better PD 3.0 support and other changes
davidanger [Fri, 7 Sep 2018 21:56:52 +0000 (23:56 +0200)]
usb_power_delivery: better PD 3.0 support and other changes

 - better PD 3.0 support
 - display PD revision in output
 - different flags for source and sink PDO's and RDO's

[Note: This commit is the remaining set of manually merged changes of the
 recent commits from Peetz0r <peter@haas-en-berg.nl> and the
 improvements from davidanger <davidanger@163.com> over at
 https://github.com/davidanger/libsigrokdecode]

15 months agousb_power_delivery: wait 1ms instead of 100k samples
Peetz0r [Fri, 7 Sep 2018 05:45:24 +0000 (07:45 +0200)]
usb_power_delivery: wait 1ms instead of 100k samples

15 months agousb_power_delivery: improve wording
Peetz0r [Fri, 7 Sep 2018 02:07:17 +0000 (04:07 +0200)]
usb_power_delivery: improve wording

Control channel => Configuration Channel

15 months agousb_power_delivery: PPS support
Peetz0r [Fri, 3 Aug 2018 20:08:59 +0000 (22:08 +0200)]
usb_power_delivery: PPS support

15 months agousb_power_delivery: Move stored PDO's inside Decoder class
Peetz0r [Mon, 30 Jul 2018 13:05:27 +0000 (15:05 +0200)]
usb_power_delivery: Move stored PDO's inside Decoder class

Also add timeout functionality to properly decode the last packet in a capture.

15 months agousb_power_delivery: print more useful stuff
Peetz0r [Thu, 19 Jul 2018 07:01:13 +0000 (09:01 +0200)]
usb_power_delivery: print more useful stuff

including:
 - power in watts
 - type of PDO (fixed, pps, etc)
 - which PDO belongs to an RDO

also deduplicated get_source_cap() and get_sink_cap()

15 months agoswim: Simplify a code snippet.
Uwe Hermann [Wed, 5 Sep 2018 23:26:22 +0000 (01:26 +0200)]
swim: Simplify a code snippet.

15 months agoDecoder for STM8 series MCUs SWIM protocol.
Mike Jagdis [Wed, 8 Aug 2018 08:58:02 +0000 (09:58 +0100)]
Decoder for STM8 series MCUs SWIM protocol.

Signed-off-by: Mike Jagdis <mjagdis@eris-associates.co.uk> (github: mjagdis)
15 months agosrd_exit(): Fix a -Wcast-function-type compiler warning.
Uwe Hermann [Thu, 30 Aug 2018 18:46:43 +0000 (20:46 +0200)]
srd_exit(): Fix a -Wcast-function-type compiler warning.

  srd.c: In function ‘srd_exit’:
  srd.c:310:28: warning: cast between incompatible function types from ‘int (*)(struct srd_session *)’ to ‘void (*)(void *, void *)’ [-Wcast-function-type]
    g_slist_foreach(sessions, (GFunc)srd_session_destroy, NULL);
                              ^

15 months agosrd_decoder_unload_all(): Fix a -Wcast-function-type compiler warning.
Uwe Hermann [Thu, 30 Aug 2018 18:42:05 +0000 (20:42 +0200)]
srd_decoder_unload_all(): Fix a -Wcast-function-type compiler warning.

  decoder.c: In function ‘srd_decoder_unload_all’:
  decoder.c:1080:27: warning: cast between incompatible function types from ‘int (*)(struct srd_decoder *)’ to ‘void (*)(void *, void *)’ [-Wcast-function-type]
    g_slist_foreach(pd_list, (GFunc)srd_decoder_unload, NULL);
                           ^

15 months agolog: add a public srd_log_callback_get() API routine
Gerhard Sittig [Wed, 15 Aug 2018 21:09:11 +0000 (23:09 +0200)]
log: add a public srd_log_callback_get() API routine

Allow applications to query the currently registered log callback. So
they can either restore the previously registered routine, or register
another routine _and_ log to the previously registered routine as well.

15 months agoMake srd_inst_decode() return the actual decoder state, not SRD_OK
Soeren Apel [Mon, 9 Jul 2018 20:20:24 +0000 (22:20 +0200)]
Make srd_inst_decode() return the actual decoder state, not SRD_OK

15 months agocounter: Consider edge counter offset also in word processing
Soeren Apel [Sun, 12 Aug 2018 10:22:44 +0000 (12:22 +0200)]
counter: Consider edge counter offset also in word processing

15 months agocounter: Let user decide how to handle the initial dead_cycles state
Soeren Apel [Sat, 11 Aug 2018 21:14:45 +0000 (23:14 +0200)]
counter: Let user decide how to handle the initial dead_cycles state

edge_off and word_off are not included in the if block because a user may
want to use edge_off to dismiss unwanted clocks instead of dead_cycles.

15 months agocounter: Introduce option to ignore edges
Gerhard Sittig [Sat, 11 Aug 2018 20:59:47 +0000 (22:59 +0200)]
counter: Introduce option to ignore edges

15 months agocounter: Use initial counter values also after a reset
Soeren Apel [Sat, 11 Aug 2018 19:12:16 +0000 (21:12 +0200)]
counter: Use initial counter values also after a reset

15 months agospi: Create the out_bitrate annotation unconditionally
Josef Gajdusek [Fri, 17 Aug 2018 14:35:50 +0000 (16:35 +0200)]
spi: Create the out_bitrate annotation unconditionally

The start() method is called before the metadata() method, which results in the
the out_bitrate instance variable never getting created and ending up as an
AttributeError when decoding.

(observed with sigrok-cli and VCD file as the input)

15 months agoedid: Shorten two code snippets.
Uwe Hermann [Wed, 29 Aug 2018 18:44:17 +0000 (20:44 +0200)]
edid: Shorten two code snippets.

15 months agoedid: Add support for extension blocks, cleanups
Stefan Brüns [Sat, 25 Aug 2018 18:19:21 +0000 (20:19 +0200)]
edid: Add support for extension blocks, cleanups

Extension blocks are widely used by e.g. HDMI to signal support for
audio, colorspaces and much more.

Cleanups:
- support short forms for annotations
- join overlapping annotations, these were unreadable in PV, and the
  positions were inaccurate (aligned to bytes instead of bits, no
  notion of used bits in split fields).

15 months agoinstall: unbreak installation with Python 3.7 (os.errno)
Gerhard Sittig [Sat, 25 Aug 2018 13:20:10 +0000 (15:20 +0200)]
install: unbreak installation with Python 3.7 (os.errno)

The os.errno module has not been an official feature. Python 3.7
removed the corresponding import. This broke the installation of
decoders. Prefer 'errno' over 'os.errno'.

16 months agoconfigure.ac: Also check for Python 3.7.
Uwe Hermann [Sun, 12 Aug 2018 18:02:22 +0000 (20:02 +0200)]
configure.ac: Also check for Python 3.7.

16 months agocounter: add support for user specified initial counter values
Gerhard Sittig [Tue, 12 Jun 2018 17:06:15 +0000 (19:06 +0200)]
counter: add support for user specified initial counter values

Introduce options for the initial edge and word counter values. Default
to 0 for compatibility with the previous implementation. This fixes
bug #1229.

16 months agomdio: accept MDIO READ without previous ADDRESS command
Gerhard Sittig [Wed, 1 Aug 2018 16:35:57 +0000 (18:35 +0200)]
mdio: accept MDIO READ without previous ADDRESS command

Fix a Python string formatting issue, where the format string disagreed
with the argument list. A READ command could unexpectedly terminate the
decoder instance when there was no previous ADDRESS command.

This fixes bug #1258.

16 months agouart: rephrase data bits to data value conversion
Gerhard Sittig [Sun, 1 Jul 2018 13:30:30 +0000 (15:30 +0200)]
uart: rephrase data bits to data value conversion

Use the already available .databits[] information which holds sample data
and bit time edge positions, and the common bitpack() routine. This shall
increase readability of the bits to value conversion.

[ best viewed with more context, like 'git diff -U5' ]

16 months agocommon: rephrase bitpack(), use list comprehension Python idiom
Gerhard Sittig [Sun, 1 Jul 2018 13:26:09 +0000 (15:26 +0200)]
common: rephrase bitpack(), use list comprehension Python idiom

17 months agojtag_ejtag: Simplify some code snippets.
Uwe Hermann [Thu, 21 Jun 2018 20:39:55 +0000 (22:39 +0200)]
jtag_ejtag: Simplify some code snippets.

17 months agojtag_ejtag: Fix short/long annotation order.
Uwe Hermann [Thu, 21 Jun 2018 20:09:55 +0000 (22:09 +0200)]
jtag_ejtag: Fix short/long annotation order.

The list of annotation strings is sorted from longest to shortest.

17 months agojtag_ejtag: Add short description in __init__.py.
Uwe Hermann [Thu, 21 Jun 2018 19:55:55 +0000 (21:55 +0200)]
jtag_ejtag: Add short description in __init__.py.

17 months agojtag_ejtag: Move bin2int() to common/srdhelper.
Uwe Hermann [Thu, 21 Jun 2018 19:49:14 +0000 (21:49 +0200)]
jtag_ejtag: Move bin2int() to common/srdhelper.

Also, rename from bin_to_int to bin2int() for consistency.

17 months agojtag_ejtag: Simplify two code snippets.
Uwe Hermann [Thu, 21 Jun 2018 19:43:22 +0000 (21:43 +0200)]
jtag_ejtag: Simplify two code snippets.

17 months agojtag_ejtag: Shorten variable names to ss/es.
Uwe Hermann [Thu, 21 Jun 2018 19:41:22 +0000 (21:41 +0200)]
jtag_ejtag: Shorten variable names to ss/es.

These abbreviations are commonly-used in all other PDs.

17 months agoAdd MIPS EJTAG decoder
Vlad Ivanov [Fri, 4 May 2018 06:57:53 +0000 (09:57 +0300)]
Add MIPS EJTAG decoder

Signed-off-by: Vlad Ivanov <vlad.ivanov@lab-systems.ru>
18 months agocfp: Add reset() method.
Uwe Hermann [Sun, 10 Jun 2018 14:28:12 +0000 (16:28 +0200)]
cfp: Add reset() method.

18 months agocfp: Use the Python in/range keywords.
Uwe Hermann [Sun, 10 Jun 2018 14:25:40 +0000 (16:25 +0200)]
cfp: Use the Python in/range keywords.

18 months agocfp: Shorten two variable names.
Uwe Hermann [Sun, 10 Jun 2018 14:21:34 +0000 (16:21 +0200)]
cfp: Shorten two variable names.

18 months agocfp: Factor out self.putx().
Uwe Hermann [Sun, 10 Jun 2018 14:20:04 +0000 (16:20 +0200)]
cfp: Factor out self.putx().

This improves readability and avoids some duplication.

18 months agocfp: Reduce indentation level.
Uwe Hermann [Sun, 10 Jun 2018 14:15:48 +0000 (16:15 +0200)]
cfp: Reduce indentation level.

18 months agocfp: Drop unneeded annotation prefix; plural fixes.
Uwe Hermann [Sun, 10 Jun 2018 14:10:16 +0000 (16:10 +0200)]
cfp: Drop unneeded annotation prefix; plural fixes.

18 months agocfp: Drop unused self.out_python.
Uwe Hermann [Sun, 10 Jun 2018 14:09:40 +0000 (16:09 +0200)]
cfp: Drop unused self.out_python.

18 months agocfp: Fix incorrect copy-paste description.
Uwe Hermann [Sun, 10 Jun 2018 14:09:21 +0000 (16:09 +0200)]
cfp: Fix incorrect copy-paste description.

18 months agoRevert "mdio: Add 'TURNAROUND' long/full annotation." in order to comply with the...
Elias Oenal [Fri, 18 May 2018 14:49:17 +0000 (16:49 +0200)]
Revert "mdio: Add 'TURNAROUND' long/full annotation." in order to comply with the naming used in the Ethernet standard.

This reverts commit 30d775b095a4b76e5fa755b19d5521affa3c053c.

18 months agoAdd a CFP decoder.
Elias Oenal [Fri, 18 May 2018 14:48:50 +0000 (16:48 +0200)]
Add a CFP decoder.

18 months agocounter: Drop unneeded tuple braces.
Uwe Hermann [Wed, 30 May 2018 06:20:10 +0000 (08:20 +0200)]
counter: Drop unneeded tuple braces.

(minor readability / consistency improvement)

18 months agocounter: emit wider annotations for data and word counts
Gerhard Sittig [Sun, 27 May 2018 07:56:49 +0000 (09:56 +0200)]
counter: emit wider annotations for data and word counts

Track the start of a data or word cycle. Avoid narrow ss=es annotations
which may be tedious to inspect by users in GUI applications. This
resolves the issue initially reported in bug #1210.

18 months agocounter: prepare for variable width annotations
Gerhard Sittig [Sun, 27 May 2018 07:46:01 +0000 (09:46 +0200)]
counter: prepare for variable width annotations

Explicitly pass a start sample number to the .putc() method, to prepare
annotations where ss differs from es. This is motivated by bug #1210.
Stick with the narrow ss=es annotations for backwards compatibility.

18 months agocounter: explicit string formatting for annotation text
Gerhard Sittig [Sun, 27 May 2018 07:41:19 +0000 (09:41 +0200)]
counter: explicit string formatting for annotation text

Replace str() conversion with explicit number text formatting, for
improved awareness and easier future adjustment during maintenance.

18 months agocounter: use local variables instead of instance variables
Gerhard Sittig [Sun, 27 May 2018 07:35:25 +0000 (09:35 +0200)]
counter: use local variables instead of instance variables

Since values get accessed within the .decode() method exclusively, we need
not store data in instance variables of the decoder object. Use another
variable for the "reset edge" option as well for consistency.

18 months agocounter: move some init code to the start of decode()
Gerhard Sittig [Sun, 27 May 2018 07:27:08 +0000 (09:27 +0200)]
counter: move some init code to the start of decode()

Since PD API v3 the .decode() method is called exactly once, and
contains a main loop itself. Move initialization code that sets up
.decode() related logic to the start of the .decode() routine.

18 months agocounter: use symbolic names for input pins, wait conditions, annotation rows
Gerhard Sittig [Sun, 27 May 2018 07:18:09 +0000 (09:18 +0200)]
counter: use symbolic names for input pins, wait conditions, annotation rows

Replace magic numbers by symbolic references to (fixed and optional)
decoder input signals, .wait() conditions, as well as annotation rows.

Move some empty lines, to better reflect which code lines form groups of
similar activity ("blocks" that logically belong together).

18 months agocounter: explicit option text to .wait() edge mapping
Gerhard Sittig [Sun, 27 May 2018 07:06:48 +0000 (09:06 +0200)]
counter: explicit option text to .wait() edge mapping

The previous implementation used the fact that libsigrok's internal API
happens to use the first letter of the user visible English option text.
Two locations mapped edge choices to API literals in different ways.
Unify them, introduce an explicit option text to literal value mapping.

(Many if not all decoder implementations do that. More adjustment to use
common code could be beneficial.)

18 months agoatsha204a: Add the reset() method.
Uwe Hermann [Fri, 25 May 2018 23:51:06 +0000 (01:51 +0200)]
atsha204a: Add the reset() method.

18 months agoatsha204a: Rename a few methods for consistency.
Uwe Hermann [Fri, 25 May 2018 23:49:58 +0000 (01:49 +0200)]
atsha204a: Rename a few methods for consistency.

18 months agoatsha204a: Shorten a few more code chunks, add helpers.
Uwe Hermann [Fri, 25 May 2018 23:47:26 +0000 (01:47 +0200)]
atsha204a: Shorten a few more code chunks, add helpers.

18 months agoatsha204a: Shorten self.opcode to op in a few places.
Uwe Hermann [Fri, 25 May 2018 23:13:51 +0000 (01:13 +0200)]
atsha204a: Shorten self.opcode to op in a few places.

18 months agoatsha204a: Use the Python 'in' keyword to improve readability.
Uwe Hermann [Fri, 25 May 2018 22:32:14 +0000 (00:32 +0200)]
atsha204a: Use the Python 'in' keyword to improve readability.

18 months agoatsha204a: Shorten output_tx_bytes()/output_rx_bytes() a bit.
Uwe Hermann [Fri, 25 May 2018 22:26:20 +0000 (00:26 +0200)]
atsha204a: Shorten output_tx_bytes()/output_rx_bytes() a bit.