libsigrokdecode.git
8 years agosrd: clean up module loading/unloading, and the decoder struct
Bert Vermeulen [Sun, 15 Jan 2012 02:58:27 +0000 (03:58 +0100)]
srd: clean up module loading/unloading, and the decoder struct

PDs are now checked for a proper Decoder object, with at least the
required attributes.

The author, long_desc and func attributes in the decoder object are gone.

8 years agomove srd_Decoder to sigrokdecode.h, and rename it in line with srd_logic
Bert Vermeulen [Sun, 15 Jan 2012 02:43:01 +0000 (03:43 +0100)]
move srd_Decoder to sigrokdecode.h, and rename it in line with srd_logic

8 years agosrd: Add ebr30a_i2c_demux PD (I2C in, 3 x I2C out).
Uwe Hermann [Sun, 15 Jan 2012 01:17:10 +0000 (02:17 +0100)]
srd: Add ebr30a_i2c_demux PD (I2C in, 3 x I2C out).

8 years agosrd: I2C: Small fixup.
Uwe Hermann [Sun, 15 Jan 2012 01:01:37 +0000 (02:01 +0100)]
srd: I2C: Small fixup.

8 years agosrd: pan1321: Support replies from device.
Uwe Hermann [Sun, 15 Jan 2012 00:22:19 +0000 (01:22 +0100)]
srd: pan1321: Support replies from device.

8 years agosrd: pan1321: Update to new UART format.
Uwe Hermann [Sat, 14 Jan 2012 22:17:40 +0000 (23:17 +0100)]
srd: pan1321: Update to new UART format.

8 years agosrd: UART: Handle both RX and TX pins.
Uwe Hermann [Sat, 14 Jan 2012 21:51:07 +0000 (22:51 +0100)]
srd: UART: Handle both RX and TX pins.

Also, experiment with readability improvements a bit.

8 years agosrd: Separate author/email fields for now.
Uwe Hermann [Sat, 14 Jan 2012 20:44:01 +0000 (21:44 +0100)]
srd: Separate author/email fields for now.

This will be needed in GUIs to easily handle/display the values without
the need for additional parsing.

8 years agoImprove 'longname' PD strings, use in 'sigrok-cli -V'.
Uwe Hermann [Sat, 14 Jan 2012 20:41:41 +0000 (21:41 +0100)]
Improve 'longname' PD strings, use in 'sigrok-cli -V'.

8 years agosrd: I2C: No need for underscores in string cmds.
Uwe Hermann [Sat, 14 Jan 2012 20:34:06 +0000 (21:34 +0100)]
srd: I2C: No need for underscores in string cmds.

8 years agosrd: Consistent PD option defaults handling.
Uwe Hermann [Sat, 14 Jan 2012 19:48:55 +0000 (20:48 +0100)]
srd: Consistent PD option defaults handling.

8 years agosrd: SPI: Add support for different CS# polarity.
Uwe Hermann [Sat, 14 Jan 2012 17:40:43 +0000 (18:40 +0100)]
srd: SPI: Add support for different CS# polarity.

8 years agosrd: SPI: Output warning annotation if CS# de-asserted.
Uwe Hermann [Sat, 14 Jan 2012 17:34:07 +0000 (18:34 +0100)]
srd: SPI: Output warning annotation if CS# de-asserted.

8 years agosrd: SPI: Support sampling on rising/falling CLK edge.
Uwe Hermann [Sat, 14 Jan 2012 17:27:54 +0000 (18:27 +0100)]
srd: SPI: Support sampling on rising/falling CLK edge.

8 years agosrd: SPI: Add support for arbitrary word sizes.
Uwe Hermann [Sat, 14 Jan 2012 17:09:11 +0000 (18:09 +0100)]
srd: SPI: Add support for arbitrary word sizes.

8 years agosrd: SPI: Add support for bit order option.
Uwe Hermann [Sat, 14 Jan 2012 17:08:00 +0000 (18:08 +0100)]
srd: SPI: Add support for bit order option.

8 years agosrd: SPI: Set default PD options.
Uwe Hermann [Sat, 14 Jan 2012 17:02:33 +0000 (18:02 +0100)]
srd: SPI: Set default PD options.

8 years agosrd: SPI: Fix typo.
Uwe Hermann [Sat, 14 Jan 2012 15:19:46 +0000 (16:19 +0100)]
srd: SPI: Fix typo.

8 years agosrd: SPI: Sketch of the PD options (unused).
Uwe Hermann [Sat, 14 Jan 2012 15:18:29 +0000 (16:18 +0100)]
srd: SPI: Sketch of the PD options (unused).

8 years agosrd: mx25lxx05d: Update to new API, make it work.
Uwe Hermann [Sat, 14 Jan 2012 14:57:27 +0000 (15:57 +0100)]
srd: mx25lxx05d: Update to new API, make it work.

This works (partially) with output from the 'spi' protocol decoder.

8 years agosrd: SPI: Handle both directions, output proto data.
Uwe Hermann [Sat, 14 Jan 2012 14:56:44 +0000 (15:56 +0100)]
srd: SPI: Handle both directions, output proto data.

8 years agosrd: SPI: probes[]: Add missing MISO and CS lines.
Uwe Hermann [Sat, 14 Jan 2012 14:25:28 +0000 (15:25 +0100)]
srd: SPI: probes[]: Add missing MISO and CS lines.

8 years agosrd: SPI: s/sdata/mosi/.
Uwe Hermann [Sat, 14 Jan 2012 14:21:03 +0000 (15:21 +0100)]
srd: SPI: s/sdata/mosi/.

8 years agosrd: SPI: s/rxdata/mosidata/.
Uwe Hermann [Sat, 14 Jan 2012 14:18:41 +0000 (15:18 +0100)]
srd: SPI: s/rxdata/mosidata/.

8 years agosrd: SPI: s/rxcount/bitcount/.
Uwe Hermann [Sat, 14 Jan 2012 14:17:33 +0000 (15:17 +0100)]
srd: SPI: s/rxcount/bitcount/.

8 years agosrd: Fix/update SPI protocol decoder.
Uwe Hermann [Sat, 14 Jan 2012 01:22:46 +0000 (02:22 +0100)]
srd: Fix/update SPI protocol decoder.

8 years agosrd: Fix transitioncounter protocol decoder.
Uwe Hermann [Sat, 14 Jan 2012 00:48:20 +0000 (01:48 +0100)]
srd: Fix transitioncounter protocol decoder.

8 years agosrd: USB: Move pids dict to global level.
Uwe Hermann [Sat, 14 Jan 2012 00:32:47 +0000 (01:32 +0100)]
srd: USB: Move pids dict to global level.

8 years agosrd: USB: Update decoder to new API, small fixes.
Uwe Hermann [Sat, 14 Jan 2012 00:29:52 +0000 (01:29 +0100)]
srd: USB: Update decoder to new API, small fixes.

8 years agosrd: Add initial DCF77 protocol decoder.
Uwe Hermann [Fri, 13 Jan 2012 17:49:09 +0000 (18:49 +0100)]
srd: Add initial DCF77 protocol decoder.

Works quite well already, but not all details of the protocol are
implemented, yet.

8 years agosrd: nunchuk: Partial update to new stacking API.
Uwe Hermann [Thu, 12 Jan 2012 22:20:41 +0000 (23:20 +0100)]
srd: nunchuk: Partial update to new stacking API.

This is unfinished and untested, and probably does not work at all, yet.

8 years agosrd: decoders: Rename obsolete timeoffset/duration.
Uwe Hermann [Thu, 12 Jan 2012 21:49:41 +0000 (22:49 +0100)]
srd: decoders: Rename obsolete timeoffset/duration.

8 years agosrd: decoders: Metadata consistency fixes/updates.
Uwe Hermann [Thu, 12 Jan 2012 21:16:26 +0000 (22:16 +0100)]
srd: decoders: Metadata consistency fixes/updates.

8 years agosrd: i2c: Drop unneeded %s usage.
Uwe Hermann [Thu, 12 Jan 2012 21:07:50 +0000 (22:07 +0100)]
srd: i2c: Drop unneeded %s usage.

8 years agosrd: i2c: Use short-form if-else Python idiom.
Uwe Hermann [Thu, 12 Jan 2012 20:57:51 +0000 (21:57 +0100)]
srd: i2c: Use short-form if-else Python idiom.

8 years agosrd: Decoders: Cosmetics and whitespace fixes.
Uwe Hermann [Thu, 12 Jan 2012 20:43:19 +0000 (21:43 +0100)]
srd: Decoders: Cosmetics and whitespace fixes.

 - Remove superfluous whitespace.

 - Add URLs and more info.

 - Consistently use ' instead of " for Python strings.

8 years agosrd: Drop duplicate SRD_ prefix from ANN/PROTO.
Uwe Hermann [Tue, 10 Jan 2012 23:52:54 +0000 (00:52 +0100)]
srd: Drop duplicate SRD_ prefix from ANN/PROTO.

Using srd.SRD_OUTPUT_ANN is unneeded, srd.OUTPUT_ANN is better/shorter.

8 years agosrd: Drop useless out_ann/out_proto init.
Uwe Hermann [Tue, 10 Jan 2012 21:12:46 +0000 (22:12 +0100)]
srd: Drop useless out_ann/out_proto init.

If those variables are used before start() was called, that's a bug anyway.

8 years agosrd: Use 'import sigrokdecode as srd' for brevity.
Uwe Hermann [Tue, 10 Jan 2012 20:10:23 +0000 (21:10 +0100)]
srd: Use 'import sigrokdecode as srd' for brevity.

8 years agosrd: annotation -> annotations.
Uwe Hermann [Tue, 10 Jan 2012 20:05:09 +0000 (21:05 +0100)]
srd: annotation -> annotations.

In the PDs (Python code), the 'annotation' variable/attribute is a list
of annotation formats. Use the plural 'annotations' as we do for other
lists such as 'inputs', 'outputs', 'probes', 'options', and so on.

8 years agosrd: Finish consistency rename to ANN/PROTO.
Uwe Hermann [Tue, 10 Jan 2012 19:44:22 +0000 (20:44 +0100)]
srd: Finish consistency rename to ANN/PROTO.

8 years agosrd: Fix typo in Makefile.am.
Uwe Hermann [Tue, 10 Jan 2012 19:43:52 +0000 (20:43 +0100)]
srd: Fix typo in Makefile.am.

8 years agosrd: Minor doxygen cosmetics.
Uwe Hermann [Tue, 10 Jan 2012 19:00:25 +0000 (20:00 +0100)]
srd: Minor doxygen cosmetics.

8 years agosrd: Add Panasonic PAN1321 decoder (on top of UART).
Uwe Hermann [Tue, 10 Jan 2012 01:37:44 +0000 (02:37 +0100)]
srd: Add Panasonic PAN1321 decoder (on top of UART).

This is just a first prototype implementation, it's not finished at all.

8 years agosrd: self.add: Use sigrokdecode.SRD_OUTPUT_*.
Uwe Hermann [Tue, 10 Jan 2012 01:16:53 +0000 (02:16 +0100)]
srd: self.add: Use sigrokdecode.SRD_OUTPUT_*.

8 years agosrd: output_{protocol,annotation} -> out_{proto,ann}.
Uwe Hermann [Tue, 10 Jan 2012 01:11:50 +0000 (02:11 +0100)]
srd: output_{protocol,annotation} -> out_{proto,ann}.

8 years agosrd: s/output_new/add/ for all decoders.
Uwe Hermann [Tue, 10 Jan 2012 01:06:31 +0000 (02:06 +0100)]
srd: s/output_new/add/ for all decoders.

8 years agoStacked protocol decoders implementation.
Bert Vermeulen [Mon, 9 Jan 2012 23:25:16 +0000 (00:25 +0100)]
Stacked protocol decoders implementation.

The DDC decoder takes input from the I2C PD.

8 years agocode cleanup
Bert Vermeulen [Sun, 8 Jan 2012 23:13:03 +0000 (00:13 +0100)]
code cleanup

8 years agosrd: change output_new() API call to add()
Bert Vermeulen [Sun, 8 Jan 2012 23:12:19 +0000 (00:12 +0100)]
srd: change output_new() API call to add()

8 years agoi2c: fix address handling
Bert Vermeulen [Sun, 8 Jan 2012 19:01:53 +0000 (20:01 +0100)]
i2c: fix address handling

8 years agopass PD output to the calling frontend, simple annotation viewer in CLI.
Bert Vermeulen [Sun, 8 Jan 2012 02:20:12 +0000 (03:20 +0100)]
pass PD output to the calling frontend, simple annotation viewer in CLI.

8 years agosrd: UART: Define an output format and document it.
Uwe Hermann [Sat, 7 Jan 2012 21:06:28 +0000 (22:06 +0100)]
srd: UART: Define an output format and document it.

This is a first attempt, might not be finished or finalized.

8 years agosrd: UART: Add more aliases, report invalid bits.
Uwe Hermann [Sat, 7 Jan 2012 20:06:16 +0000 (21:06 +0100)]
srd: UART: Add more aliases, report invalid bits.

8 years agosrd: UART: Update to new PD annotation API.
Uwe Hermann [Sat, 7 Jan 2012 17:57:47 +0000 (18:57 +0100)]
srd: UART: Update to new PD annotation API.

8 years agosrd: UART: Drop 'quick_hack' stuff.
Uwe Hermann [Sat, 7 Jan 2012 17:42:53 +0000 (18:42 +0100)]
srd: UART: Drop 'quick_hack' stuff.

8 years agosrd: Add SRD_ERR_BUG.
Uwe Hermann [Sat, 7 Jan 2012 16:14:08 +0000 (17:14 +0100)]
srd: Add SRD_ERR_BUG.

8 years agoMore .gitignore files cleanup.
Uwe Hermann [Sat, 7 Jan 2012 13:15:10 +0000 (14:15 +0100)]
More .gitignore files cleanup.

8 years agoexpose SRD_OUTPUT_* as symbols in the sigrokdecode module.
Bert Vermeulen [Sat, 7 Jan 2012 03:18:16 +0000 (04:18 +0100)]
expose SRD_OUTPUT_* as symbols in the sigrokdecode module.

8 years agoDecoder.output_new() now takes an extra protocol_id argument.
Bert Vermeulen [Sat, 7 Jan 2012 02:59:16 +0000 (03:59 +0100)]
Decoder.output_new() now takes an extra protocol_id argument.

8 years agocheck before calling PyObject_GetAttrString(): this throws an exception.
Bert Vermeulen [Sat, 7 Jan 2012 02:42:26 +0000 (03:42 +0100)]
check before calling PyObject_GetAttrString(): this throws an exception.

8 years agoconvert data coming in from a PD to C structs
Bert Vermeulen [Sat, 7 Jan 2012 01:50:14 +0000 (02:50 +0100)]
convert data coming in from a PD to C structs

This is in preparation for passing annotation data back to the calling
frontend, and python data up to the next protocol in the stack.

8 years agoAdded "autostuff" to the .gitignore.
Renato Caldas [Fri, 6 Jan 2012 11:07:37 +0000 (11:07 +0000)]
Added "autostuff" to the .gitignore.

8 years agosrd: We use 0/1 instead of False/True at the moment.
Uwe Hermann [Thu, 5 Jan 2012 20:07:23 +0000 (21:07 +0100)]
srd: We use 0/1 instead of False/True at the moment.

8 years agosrd: Update mx25lxx05d.py to new API.
Uwe Hermann [Thu, 5 Jan 2012 19:58:52 +0000 (20:58 +0100)]
srd: Update mx25lxx05d.py to new API.

8 years agosrd: Update nunchuk decoder to new API.
Uwe Hermann [Thu, 5 Jan 2012 19:56:59 +0000 (20:56 +0100)]
srd: Update nunchuk decoder to new API.

8 years agosrd: Update transitioncounter to the new API.
Uwe Hermann [Thu, 5 Jan 2012 19:50:37 +0000 (20:50 +0100)]
srd: Update transitioncounter to the new API.

8 years agosrd: Update USB decoder to the new API.
Uwe Hermann [Thu, 5 Jan 2012 19:26:54 +0000 (20:26 +0100)]
srd: Update USB decoder to the new API.

8 years agosrd: Update the SPI decoder to the new API.
Uwe Hermann [Thu, 5 Jan 2012 18:00:27 +0000 (19:00 +0100)]
srd: Update the SPI decoder to the new API.

8 years agosrd: Convert UART decoder to new API.
Uwe Hermann [Thu, 5 Jan 2012 15:27:15 +0000 (16:27 +0100)]
srd: Convert UART decoder to new API.

8 years agosrd: Small Python detection fixes.
Uwe Hermann [Thu, 5 Jan 2012 15:01:25 +0000 (16:01 +0100)]
srd: Small Python detection fixes.

8 years agoconfigure.ac: fixed python3-config detection.
Renato Caldas [Thu, 5 Jan 2012 14:27:13 +0000 (14:27 +0000)]
configure.ac: fixed python3-config detection.

8 years agonew srd_logic type implementation for PDs to iterate over.
Bert Vermeulen [Thu, 5 Jan 2012 02:31:36 +0000 (03:31 +0100)]
new srd_logic type implementation for PDs to iterate over.

8 years agoA few more fixes for configure.ac files.
Uwe Hermann [Wed, 4 Jan 2012 14:26:41 +0000 (15:26 +0100)]
A few more fixes for configure.ac files.

Add missing checks and quotes, remove superfluous checks, etc.

8 years agosr/srd: Add Doxyfile to the tarball.
Uwe Hermann [Wed, 4 Jan 2012 01:50:26 +0000 (02:50 +0100)]
sr/srd: Add Doxyfile to the tarball.

8 years agosrd: Show config summary, libs, and Python info.
Uwe Hermann [Wed, 4 Jan 2012 01:41:33 +0000 (02:41 +0100)]
srd: Show config summary, libs, and Python info.

8 years agosrd: configure.ac: Fix version number magic.
Uwe Hermann [Tue, 3 Jan 2012 23:44:02 +0000 (00:44 +0100)]
srd: configure.ac: Fix version number magic.

8 years agoPut most autotools files into autostuff/.
Uwe Hermann [Tue, 3 Jan 2012 20:55:48 +0000 (21:55 +0100)]
Put most autotools files into autostuff/.

This yields a slightly more "tidy" top-level directory.

8 years agosrd: Remove decode() docstrings.
Uwe Hermann [Tue, 3 Jan 2012 19:26:29 +0000 (20:26 +0100)]
srd: Remove decode() docstrings.

This info is in the decoder's metadata, where the frontends can get it
from programmatically anyway.

8 years agosrd: Put files into .../share/libsigrokdecode.
Uwe Hermann [Tue, 3 Jan 2012 19:08:18 +0000 (20:08 +0100)]
srd: Put files into .../share/libsigrokdecode.

8 years agosr/srd: Fix left-over #includes.
Uwe Hermann [Tue, 3 Jan 2012 18:56:01 +0000 (19:56 +0100)]
sr/srd: Fix left-over #includes.

The libs themselves should use #include "sigrok.h" etc., while the
frontends must use #include <sigrok.h> and so on.

8 years agosrd: *.py: Remove one incorrect ord() call.
Uwe Hermann [Tue, 3 Jan 2012 18:36:30 +0000 (19:36 +0100)]
srd: *.py: Remove one incorrect ord() call.

While 'data' is of type 'bytes', 'data[0]' for example is of type 'int',
thus the ord() there is neither needed nor correct anymore (yields an error).

8 years agosrd: Quick hack to make nunchuk.py work again.
Uwe Hermann [Tue, 3 Jan 2012 18:30:17 +0000 (19:30 +0100)]
srd: Quick hack to make nunchuk.py work again.

8 years agosrd: Quick hack to make mx25lxx05d.py work again.
Uwe Hermann [Tue, 3 Jan 2012 18:17:01 +0000 (19:17 +0100)]
srd: Quick hack to make mx25lxx05d.py work again.

In Python 3 there's no xrange() anymore, only range().

8 years agosrd: Quick hack to make transitioncounter.py work again.
Uwe Hermann [Tue, 3 Jan 2012 18:13:48 +0000 (19:13 +0100)]
srd: Quick hack to make transitioncounter.py work again.

8 years agosrd: Quick hack to make the USB decoder work again.
Uwe Hermann [Tue, 3 Jan 2012 17:33:43 +0000 (18:33 +0100)]
srd: Quick hack to make the USB decoder work again.

8 years agosrd: Quick hack to make the SPI decoder work again.
Uwe Hermann [Tue, 3 Jan 2012 17:32:08 +0000 (18:32 +0100)]
srd: Quick hack to make the SPI decoder work again.

Since Python 3 there are some explicit int() casts needed.

8 years agosrd: Quick hack to make the UART decoder work again.
Uwe Hermann [Tue, 3 Jan 2012 16:47:55 +0000 (17:47 +0100)]
srd: Quick hack to make the UART decoder work again.

8 years agosrd: configure.ac: Add comment.
Uwe Hermann [Mon, 2 Jan 2012 13:23:15 +0000 (14:23 +0100)]
srd: configure.ac: Add comment.

8 years agoSplit README, add appropriate ones per-project.
Uwe Hermann [Fri, 30 Dec 2011 21:38:25 +0000 (22:38 +0100)]
Split README, add appropriate ones per-project.

8 years agosr/srd: Remove/fix non-applicable autotools stuff.
Uwe Hermann [Fri, 30 Dec 2011 09:50:00 +0000 (10:50 +0100)]
sr/srd: Remove/fix non-applicable autotools stuff.

8 years agosr/srd: Move some files to their resp. dirs.
Uwe Hermann [Fri, 30 Dec 2011 09:42:39 +0000 (10:42 +0100)]
sr/srd: Move some files to their resp. dirs.

8 years agoFix utf8 encoding error by changing the Python parameter to a bytes() object (python3...
Kristoffer Sjöberg [Wed, 28 Dec 2011 14:14:31 +0000 (15:14 +0100)]
Fix utf8 encoding error by changing the Python parameter to a bytes() object (python3 regression).

8 years agobetter python memory management
Bert Vermeulen [Wed, 28 Dec 2011 12:40:23 +0000 (13:40 +0100)]
better python memory management

8 years agopython 3 port
Bert Vermeulen [Tue, 27 Dec 2011 21:15:53 +0000 (22:15 +0100)]
python 3 port

8 years agomake time/duration work, at least when loading from a session file
Bert Vermeulen [Thu, 15 Dec 2011 02:31:31 +0000 (03:31 +0100)]
make time/duration work, at least when loading from a session file

PD decode() call now takes 3 arguments: timeoffset, duration, data
as per the current API specification.

8 years agonew dynamic output stream registration code, not finished.
Bert Vermeulen [Wed, 7 Dec 2011 08:56:49 +0000 (09:56 +0100)]
new dynamic output stream registration code, not finished.

8 years agosrd: SRD_ERR_ARGS -> SRD_ERR_ARG.
Uwe Hermann [Wed, 21 Dec 2011 18:09:46 +0000 (19:09 +0100)]
srd: SRD_ERR_ARGS -> SRD_ERR_ARG.

This is done to be consistent with libsigrok's SR_ERR_ARG (nicer that way).

8 years agosrd: Add logging framework.
Uwe Hermann [Wed, 21 Dec 2011 17:57:04 +0000 (18:57 +0100)]
srd: Add logging framework.

This includes the (private) functions srd_err() and friends, the
(public) SRD_LOG_ERR macros and friends, and the (public) API functions
srd_set_loglevel() and srd_get_loglevel().

8 years agosrd: Add MX25Lxx05D SPI chip decoder.
Uwe Hermann [Sat, 17 Dec 2011 16:29:10 +0000 (17:29 +0100)]
srd: Add MX25Lxx05D SPI chip decoder.

Work in progress, not yet fully functional.