]> sigrok.org Git - libsigrokdecode.git/log
libsigrokdecode.git
12 years agosrd: nunchuk: Fix most annotation samplenumbers.
Uwe Hermann [Sun, 27 May 2012 14:15:06 +0000 (16:15 +0200)]
srd: nunchuk: Fix most annotation samplenumbers.

Also, add a self.putx() helper method, as most annotations we have right
now are exactly one I2C packet long (there will also be others later, though).

12 years agosrd: Wii Nunchuk: Complete rewrite, PD works now.
Uwe Hermann [Sun, 27 May 2012 14:05:34 +0000 (16:05 +0200)]
srd: Wii Nunchuk: Complete rewrite, PD works now.

The Nintendo Wii Nunchuk protocol decoder, while it was in the repo for
a while, didn't really work yet (among other things, due to lack of
dumps for testing the code).

This is fixed now, the rewritten decoder works fine with most dump
files in the sigrok-dumps repo. A few minor issues remain to be
added/fixed, though.

12 years agosrd: Cosmetics.
Uwe Hermann [Tue, 29 May 2012 23:04:48 +0000 (01:04 +0200)]
srd: Cosmetics.

12 years agosrd: Disable 'onewire' PD for now, until it's working.
Uwe Hermann [Tue, 29 May 2012 23:04:29 +0000 (01:04 +0200)]
srd: Disable 'onewire' PD for now, until it's working.

12 years agosr/srd/cli/gtk: ChangeLog -> MAINTAINERCLEANFILES.
Uwe Hermann [Tue, 29 May 2012 18:30:15 +0000 (20:30 +0200)]
sr/srd/cli/gtk: ChangeLog -> MAINTAINERCLEANFILES.

If the (generated) ChangeLog file is marked for DISTCLEANFILES, it'll be
removed whenever "make distclean" is called (and is then gone forever if
you use the tarballs, for example).

12 years agosrd: onewire: Fix incorrect format for annotation output.
Uwe Hermann [Tue, 22 May 2012 23:12:11 +0000 (01:12 +0200)]
srd: onewire: Fix incorrect format for annotation output.

Should be a list containing:

 - Annotation format number (e.g. 0, or ANN_DEC, etc).

 - A list of strings (the annotation). If more than one string is
   supplied, the other ones should be short versions of the string.
   Example: [ANN_DEC, ["Foobarbaz", "Foo", "F"]]

   This is optional, and mostly useful for GUIs.

12 years agosrd: onewire: Fix %d and %s mismatch.
Uwe Hermann [Tue, 22 May 2012 23:09:49 +0000 (01:09 +0200)]
srd: onewire: Fix %d and %s mismatch.

12 years agosrd: onewire: Get optional 'pwr' probe value, too.
Uwe Hermann [Tue, 22 May 2012 23:01:03 +0000 (01:01 +0200)]
srd: onewire: Get optional 'pwr' probe value, too.

12 years agosrd: onewire: Drop UART leftover comments.
Uwe Hermann [Tue, 22 May 2012 22:59:50 +0000 (00:59 +0200)]
srd: onewire: Drop UART leftover comments.

12 years agoremoved some code copied from UART decoder, fixed some Python syntax issues
Iztok Jeras [Tue, 22 May 2012 20:27:25 +0000 (22:27 +0200)]
removed some code copied from UART decoder, fixed some Python syntax issues

12 years agounfinished update to onewire protocol decoder
Iztok Jeras [Wed, 16 May 2012 20:01:32 +0000 (22:01 +0200)]
unfinished update to onewire protocol decoder

12 years agocommiting new unfinished 1-wire decoder
Iztok Jeras [Tue, 15 May 2012 21:15:26 +0000 (23:15 +0200)]
commiting new unfinished 1-wire decoder

12 years agosrd: MX25Lxx05D: Fix inverted SRWD bit handling.
Uwe Hermann [Fri, 18 May 2012 19:42:29 +0000 (21:42 +0200)]
srd: MX25Lxx05D: Fix inverted SRWD bit handling.

12 years agosrd: MX25Lxx05D: Decode status register bits.
Uwe Hermann [Fri, 18 May 2012 17:58:58 +0000 (19:58 +0200)]
srd: MX25Lxx05D: Decode status register bits.

12 years agosrd: MX25Lxx05D: Fix SE command.
Uwe Hermann [Fri, 18 May 2012 13:28:52 +0000 (15:28 +0200)]
srd: MX25Lxx05D: Fix SE command.

12 years agosrd: MX25Lxx05D: Implement READ command.
Uwe Hermann [Fri, 18 May 2012 13:05:03 +0000 (15:05 +0200)]
srd: MX25Lxx05D: Implement READ command.

12 years agosrd: MX25Lxx05D: Implement RDSR and PP commands.
Uwe Hermann [Wed, 16 May 2012 21:06:21 +0000 (23:06 +0200)]
srd: MX25Lxx05D: Implement RDSR and PP commands.

Also, some small fixes and additional debug code/output.

12 years agosrd: spi: Document output protocol, send CS# changes.
Uwe Hermann [Wed, 16 May 2012 20:48:47 +0000 (22:48 +0200)]
srd: spi: Document output protocol, send CS# changes.

As per guidelines in HACKING, the protocol "commands"/items should be ALLCAPS,
thus change 'data' to 'DATA'. Also, fix MX25Lxx05D protocol decoder
accordingly, currently the only one we have which stacks on top of SPI.

Add a new 'CS-CHANGE' output protocol item, which is sent upon every
change of the CS# pin value (either 0->1, or vice versa). This is needed
by various higher-level PDs.

12 years agosr/srd/cli: Fix compiling with Homebrew.
Pekka Nikander [Fri, 11 May 2012 16:23:21 +0000 (19:23 +0300)]
sr/srd/cli: Fix compiling with Homebrew.

Add ACLOCAL_DIR setting and AM_PROG_AR macro for compiling with Homebrew
under Mac OS X.

Applies essentially the same change to
{libsigrok,libsigrokdecode,sigrok-cli}/{autogen.sh,configure.ac}

It may be that the same fix is needed for the other autogen.sh and/or
configure.ac files, but that hasn't been tested and therefore not in
this commit.

12 years agosrd: JTAG: Enavble and get/use optional probes.
Uwe Hermann [Thu, 10 May 2012 07:38:54 +0000 (09:38 +0200)]
srd: JTAG: Enavble and get/use optional probes.

12 years agosrd: Support for one or more optional probes.
Uwe Hermann [Thu, 10 May 2012 07:34:13 +0000 (09:34 +0200)]
srd: Support for one or more optional probes.

In the protocol decoder you always get all required probes, then _all_
optional probes in the list of probes in the decode() call.

Example:

 (r1, r2, r3, o1, o2, o3, o4) = pins

In this case r1-r3 are required probes, o1-o4 are optional probes.
However, the value of valid/used/specified probes will be 0 or 1,
whereas the value of probes that were not specified/assigned by the user
will be (at the moment) 42.

The PD can check for a valid probe like this:

  if p in (0, 1):
    ...

Or check for an invalid probe:

  if (p > 1):
    ...

The value of 42 could change to be -1 or None later.

12 years agosrd: Fix a few Doxygen errors.
Uwe Hermann [Tue, 8 May 2012 23:06:01 +0000 (01:06 +0200)]
srd: Fix a few Doxygen errors.

12 years agosrd: Add usable one-liner descriptions for all PDs.
Uwe Hermann [Tue, 8 May 2012 22:35:30 +0000 (00:35 +0200)]
srd: Add usable one-liner descriptions for all PDs.

12 years agosrd: Remove TODOs from annotation format names.
Uwe Hermann [Tue, 8 May 2012 21:53:48 +0000 (23:53 +0200)]
srd: Remove TODOs from annotation format names.

Also, fix minor consistency issues, cosmetics, typos.

12 years agosrd: JTAG/SMT32: Some more improvements.
Uwe Hermann [Sat, 5 May 2012 17:51:30 +0000 (19:51 +0200)]
srd: JTAG/SMT32: Some more improvements.

Add APB-AP register offsets/names, refactor and fix some code, handle
in/out APACC/DPACC better.

12 years agoFix bracket placing
Thomas Jarosch [Fri, 4 May 2012 08:18:22 +0000 (10:18 +0200)]
Fix bracket placing

Make it consistent with the rest of the code

Signed-off-by: Thomas Jarosch <redacted>
12 years agosrd: JTAG/STM32: Factor out dpacc_data_in/out.
Uwe Hermann [Thu, 3 May 2012 19:22:03 +0000 (21:22 +0200)]
srd: JTAG/STM32: Factor out dpacc_data_in/out.

Also, add a few code comments.

12 years agosrd: JTAG/STM32: Decode IDCODE[31:0] parts.
Uwe Hermann [Thu, 3 May 2012 17:19:01 +0000 (19:19 +0200)]
srd: JTAG/STM32: Decode IDCODE[31:0] parts.

12 years agosrd: JTAG: Also show the bitstrings in hex (for now).
Uwe Hermann [Wed, 2 May 2012 23:39:30 +0000 (01:39 +0200)]
srd: JTAG: Also show the bitstrings in hex (for now).

12 years agosrd: JTAG/STM32: Various improvements, fixes.
Uwe Hermann [Wed, 2 May 2012 23:39:16 +0000 (01:39 +0200)]
srd: JTAG/STM32: Various improvements, fixes.

Add APACC register handling, fix DPACC handling (esp. 'A' register size),
ouput a warning upon reserved DAPABORT bits being non-zero, implement
preliminary state machine, add various TODOs.

This is still work in progress, not yet finished or working properly.

12 years agosrd: Add initial JTAG/STM32 protocol decoder.
Uwe Hermann [Sat, 28 Apr 2012 17:24:57 +0000 (19:24 +0200)]
srd: Add initial JTAG/STM32 protocol decoder.

(not yet finished)

This protocol decoder can decode ST STM32 specific JTAG accesses, knows
about the STM32-specific registers and bits.

12 years agosrd: JTAG: Add some more docs.
Uwe Hermann [Sat, 28 Apr 2012 22:46:02 +0000 (00:46 +0200)]
srd: JTAG: Add some more docs.

12 years agosrd: JTAG: The TRST# (and SRST#) signals are optional.
Uwe Hermann [Sat, 28 Apr 2012 22:35:52 +0000 (00:35 +0200)]
srd: JTAG: The TRST# (and SRST#) signals are optional.

Don't handle them for now, will do this later.

12 years agosrd: jtag: Various bugfixes.
Uwe Hermann [Sat, 28 Apr 2012 17:24:14 +0000 (19:24 +0200)]
srd: jtag: Various bugfixes.

Most importantly, both TDI and TDO are sampled at the rising TCK edge,
and only upon transitions from SHIFT-DR to SHIFT-DR and SHIFT-IR to SHIFT-IR
are we to save the TDI/TDO values (if I understood this correcly).

Also, start out in RUN-TEST/IDLE state for now. This is useful if you
have JTAG dumps which start "in the middle" somewhere, not in the
TEST-LOGIC-RESET state. For full dumps, the JTAG software usually issues
five TMS=1 cycles to force the JTAG state machine into TEST-LOGIC-RESET
anyway, so this works fine too.

12 years agosrd: Add initial JTAG protocol decoder.
Uwe Hermann [Thu, 26 Apr 2012 20:51:26 +0000 (22:51 +0200)]
srd: Add initial JTAG protocol decoder.

This is unfinished, needs some more work.

12 years agosrd: lpc: Minor additions/fixes.
Uwe Hermann [Wed, 25 Apr 2012 16:44:50 +0000 (18:44 +0200)]
srd: lpc: Minor additions/fixes.

12 years agosrd: MXC6225XU: Bugfixes, add missing bits/registers.
Uwe Hermann [Sat, 21 Apr 2012 17:58:47 +0000 (19:58 +0200)]
srd: MXC6225XU: Bugfixes, add missing bits/registers.

12 years agosrd: Initial MEMSIC MXC6225XU protocol decoder.
Uwe Hermann [Thu, 19 Apr 2012 18:18:10 +0000 (20:18 +0200)]
srd: Initial MEMSIC MXC6225XU protocol decoder.

Not quite finished yet, but relatively close.

12 years agoInitial LPC protocol decoder implementation.
Uwe Hermann [Tue, 17 Apr 2012 21:28:12 +0000 (23:28 +0200)]
Initial LPC protocol decoder implementation.

This is unfinished and not tested, and probably not really working, yet.

12 years agosrd: Initial 0.1.0 release. libsigrokdecode-0.1.0
Uwe Hermann [Mon, 16 Apr 2012 22:12:56 +0000 (00:12 +0200)]
srd: Initial 0.1.0 release.

12 years agosr/srd: SR_API/SRD_API/etc. is a no-op on MinGW.
Uwe Hermann [Mon, 16 Apr 2012 21:16:00 +0000 (23:16 +0200)]
sr/srd: SR_API/SRD_API/etc. is a no-op on MinGW.

This avoids warnings on a MinGW build. The feature depends on ELF files,
but MinGW/Windows uses PE files.

12 years agosrd: Quickfix for MinGW build issue.
Uwe Hermann [Mon, 16 Apr 2012 21:10:26 +0000 (23:10 +0200)]
srd: Quickfix for MinGW build issue.

12 years agosrd: Add functions to query srd version(s).
Uwe Hermann [Sun, 15 Apr 2012 18:58:08 +0000 (20:58 +0200)]
srd: Add functions to query srd version(s).

12 years agosr/srd: Use/fix SR(D)_MAX_NUM_PROBES.
Uwe Hermann [Sat, 7 Apr 2012 16:14:39 +0000 (18:14 +0200)]
sr/srd: Use/fix SR(D)_MAX_NUM_PROBES.

12 years agosrd/i2s: Added links to documentation
Joel Holdsworth [Fri, 6 Apr 2012 21:29:31 +0000 (22:29 +0100)]
srd/i2s: Added links to documentation

12 years agosrd/i2s: Added sample-rate and bit-depth to report
Joel Holdsworth [Fri, 6 Apr 2012 21:01:30 +0000 (22:01 +0100)]
srd/i2s: Added sample-rate and bit-depth to report

12 years agosrd/i2s: Print a warning on receiving a malformed word
Joel Holdsworth [Fri, 6 Apr 2012 19:11:01 +0000 (20:11 +0100)]
srd/i2s: Print a warning on receiving a malformed word

12 years agosrd/i2s: Initial implementation
Joel Holdsworth [Fri, 6 Apr 2012 19:01:02 +0000 (20:01 +0100)]
srd/i2s: Initial implementation

12 years agosrd: Disable 'nunchuk' PD for now, it's unfinished.
Uwe Hermann [Sat, 31 Mar 2012 15:06:03 +0000 (17:06 +0200)]
srd: Disable 'nunchuk' PD for now, it's unfinished.

12 years agosrd: Decoders: Fix/simplify samplenum usage.
Uwe Hermann [Sat, 31 Mar 2012 15:04:50 +0000 (17:04 +0200)]
srd: Decoders: Fix/simplify samplenum usage.

12 years agosr/srd: Fix 'make distcheck'.
Uwe Hermann [Sat, 31 Mar 2012 10:09:37 +0000 (12:09 +0200)]
sr/srd: Fix 'make distcheck'.

12 years agosr/srd: Add ChangeLog to ignore list, it's generated.
Uwe Hermann [Sat, 31 Mar 2012 10:05:20 +0000 (12:05 +0200)]
sr/srd: Add ChangeLog to ignore list, it's generated.

12 years agosrd: Generate ChangeLog from git upon 'make dist'.
Uwe Hermann [Sat, 31 Mar 2012 09:38:38 +0000 (11:38 +0200)]
srd: Generate ChangeLog from git upon 'make dist'.

12 years agosrd: Add NEWS file.
Uwe Hermann [Sat, 31 Mar 2012 09:37:19 +0000 (11:37 +0200)]
srd: Add NEWS file.

12 years agosrd: SRD_PACKAGE_VERSION_* for consistency.
Uwe Hermann [Sat, 31 Mar 2012 09:31:14 +0000 (11:31 +0200)]
srd: SRD_PACKAGE_VERSION_* for consistency.

No need to use the LIBSIGROKDECODE_ prefix here when we use SRD_ everywhere
else. Also, better distinction between package version and lib version.

12 years agosrd: Some more (optional) consistency renames.
Uwe Hermann [Sun, 25 Mar 2012 13:08:16 +0000 (15:08 +0200)]
srd: Some more (optional) consistency renames.

12 years agosrd/cli/qt: Some more API consistency renames.
Uwe Hermann [Sun, 25 Mar 2012 12:49:11 +0000 (14:49 +0200)]
srd/cli/qt: Some more API consistency renames.

12 years agosrd: PDs: Kill obsolete 'longdesc' entries.
Uwe Hermann [Sun, 25 Mar 2012 07:39:44 +0000 (09:39 +0200)]
srd: PDs: Kill obsolete 'longdesc' entries.

12 years agosrd: Add .gitignore file.
Uwe Hermann [Sat, 24 Mar 2012 21:05:59 +0000 (22:05 +0100)]
srd: Add .gitignore file.

12 years agosrd: sigrokdecode.h: Add version macros.
Uwe Hermann [Sat, 24 Mar 2012 18:41:40 +0000 (19:41 +0100)]
srd: sigrokdecode.h: Add version macros.

12 years agosrd: Rename sigrokdecode.h to sigrokdecode.h.in.
Uwe Hermann [Sat, 24 Mar 2012 16:52:48 +0000 (17:52 +0100)]
srd: Rename sigrokdecode.h to sigrokdecode.h.in.

12 years agosrd: List 'report()' in all PDs for consistency.
Uwe Hermann [Sat, 24 Mar 2012 08:37:55 +0000 (09:37 +0100)]
srd: List 'report()' in all PDs for consistency.

12 years agosrd: Drop unused inputformats/outputformats entries.
Uwe Hermann [Wed, 21 Mar 2012 21:38:08 +0000 (22:38 +0100)]
srd: Drop unused inputformats/outputformats entries.

12 years agosr/srd: Remove API warnings from READMEs.
Uwe Hermann [Wed, 21 Mar 2012 21:33:51 +0000 (22:33 +0100)]
sr/srd: Remove API warnings from READMEs.

We'll have a libsigrok and a libsigrokdecode release soon. After that,
any API changes must be properly documented and reflected in the
SO version (and package version) numbers of the libs.

12 years agosrd: Drop ebr30a_i2c_demux in favor of i2cdemux.
Uwe Hermann [Wed, 21 Mar 2012 18:40:07 +0000 (19:40 +0100)]
srd: Drop ebr30a_i2c_demux in favor of i2cdemux.

The i2cdemux protocol decoder is the more generic version of the
obsolete ebr30a_i2c_demux decoder, and should be able (now or later) to do
everything that ebr30a_i2c_demux can do.

12 years agosr/srd: Small fixes, constifications, doc updates.
Uwe Hermann [Wed, 21 Mar 2012 18:28:43 +0000 (19:28 +0100)]
sr/srd: Small fixes, constifications, doc updates.

12 years agosr/cli/gtk/qt: Fix package version numbers / docs.
Uwe Hermann [Wed, 21 Mar 2012 17:40:25 +0000 (18:40 +0100)]
sr/cli/gtk/qt: Fix package version numbers / docs.

The next (and first) libsigrok release will be called 0.1.0.

The next (and first) libsigrokdecode release will be called 0.1.0.

The next sigrok-cli release will be called 0.3.0 (as we already had a 0.1
and 0.2 release of sigrok-cli; those did not yet use the libs, though).

sigrok-gtk and sigrok-qt didn't have any releases yet, so their version
numbers are set to 0.1.0.

Also, consistently use three numbers/digits for our version numbers.

12 years agosrd: srd_exit(): Set pd_list to NULL after freeing.
Uwe Hermann [Tue, 20 Mar 2012 17:02:45 +0000 (18:02 +0100)]
srd: srd_exit(): Set pd_list to NULL after freeing.

This will ensure that any subsequent checks for pd_list == NULL work
properly.

12 years agosrd/cli/qt: s/srd_session_feed/srd_session_send/.
Uwe Hermann [Tue, 20 Mar 2012 16:58:25 +0000 (17:58 +0100)]
srd/cli/qt: s/srd_session_feed/srd_session_send/.

12 years agosrd/cli/qt:s/decoders/decoder/ for consistency.
Uwe Hermann [Fri, 16 Mar 2012 14:25:53 +0000 (15:25 +0100)]
srd/cli/qt:s/decoders/decoder/ for consistency.

12 years agosrd: Constify lots more parameters.
Uwe Hermann [Fri, 16 Mar 2012 14:12:54 +0000 (15:12 +0100)]
srd: Constify lots more parameters.

12 years agosrd: Cosmetics, fix/add Doxygen comments.
Uwe Hermann [Thu, 15 Mar 2012 21:00:24 +0000 (22:00 +0100)]
srd: Cosmetics, fix/add Doxygen comments.

12 years agosrd: Fix typos.
Uwe Hermann [Sun, 18 Mar 2012 13:16:50 +0000 (14:16 +0100)]
srd: Fix typos.

12 years agosrd: Drop unused ARRAY_SIZE/ARRAY_AND_SIZE for now.
Uwe Hermann [Wed, 14 Mar 2012 21:12:08 +0000 (22:12 +0100)]
srd: Drop unused ARRAY_SIZE/ARRAY_AND_SIZE for now.

12 years agosrd: I2C: Update PD protocol docs.
Uwe Hermann [Sun, 4 Mar 2012 09:55:30 +0000 (10:55 +0100)]
srd: I2C: Update PD protocol docs.

12 years agosrd: PDs: More cosmetics.
Uwe Hermann [Sun, 4 Mar 2012 09:40:58 +0000 (10:40 +0100)]
srd: PDs: More cosmetics.

12 years agosrd: PDs: Use strings for states, too.
Uwe Hermann [Sun, 4 Mar 2012 09:13:29 +0000 (10:13 +0100)]
srd: PDs: Use strings for states, too.

12 years agosrd: PDs: Consistency/cosmetic fixes.
Uwe Hermann [Sat, 3 Mar 2012 13:39:14 +0000 (14:39 +0100)]
srd: PDs: Consistency/cosmetic fixes.

12 years agosr/srd: s/handler/callback/.
Uwe Hermann [Sat, 3 Mar 2012 13:13:21 +0000 (14:13 +0100)]
sr/srd: s/handler/callback/.

We should consistently use the same name for the same thing.

12 years agosr: Name all callback data 'cb_data'.
Uwe Hermann [Wed, 29 Feb 2012 21:32:34 +0000 (22:32 +0100)]
sr: Name all callback data 'cb_data'.

12 years agosr/srd: Consistency fixes for callbacks.
Uwe Hermann [Wed, 29 Feb 2012 20:56:24 +0000 (21:56 +0100)]
sr/srd: Consistency fixes for callbacks.

 - Callback function pointer typedefs end with _t.

 - Variables holding callback functions are named 'cb' everywhere.

12 years agosrd: I2C: change format to have ACK/NACK bits as separate events
Bert Vermeulen [Tue, 28 Feb 2012 13:33:45 +0000 (14:33 +0100)]
srd: I2C: change format to have ACK/NACK bits as separate events

12 years agosrd: fix SIGROKDECODE_DIR env variable brokenness
Bert Vermeulen [Tue, 28 Feb 2012 01:01:41 +0000 (02:01 +0100)]
srd: fix SIGROKDECODE_DIR env variable brokenness

12 years agosrd: properly return status code
Bert Vermeulen [Tue, 28 Feb 2012 00:16:29 +0000 (01:16 +0100)]
srd: properly return status code

12 years agosrd: PDs: Whitespace and cosmetics.
Uwe Hermann [Mon, 27 Feb 2012 23:42:45 +0000 (00:42 +0100)]
srd: PDs: Whitespace and cosmetics.

12 years agosrd: rename public API functions to srd_thing_action format
Bert Vermeulen [Tue, 14 Feb 2012 02:43:28 +0000 (03:43 +0100)]
srd: rename public API functions to srd_thing_action format

12 years agosrd: don't load all protocol decoders unless we really need to.
Bert Vermeulen [Tue, 14 Feb 2012 02:28:53 +0000 (03:28 +0100)]
srd: don't load all protocol decoders unless we really need to.

12 years agosrd: last public/private fix, and docs for all publis functions.
Bert Vermeulen [Sun, 12 Feb 2012 13:55:20 +0000 (14:55 +0100)]
srd: last public/private fix, and docs for all publis functions.

12 years agosrd: finish up public/private API
Bert Vermeulen [Sun, 12 Feb 2012 13:18:32 +0000 (14:18 +0100)]
srd: finish up public/private API

12 years agosrd: no public API functions use python-specific arguments now
Bert Vermeulen [Sun, 12 Feb 2012 12:47:07 +0000 (13:47 +0100)]
srd: no public API functions use python-specific arguments now

12 years agosrd: extra module path can now optionally be passed to srd_init()
Bert Vermeulen [Sun, 12 Feb 2012 03:07:22 +0000 (04:07 +0100)]
srd: extra module path can now optionally be passed to srd_init()

Also environment variable SIGROKDECODE_DIR, if present, is prepended
to the module path.

12 years agoRename 'void *' callback parameters to 'user_data'.
Uwe Hermann [Sat, 11 Feb 2012 21:09:18 +0000 (22:09 +0100)]
Rename 'void *' callback parameters to 'user_data'.

This is better, both for consistency reasons, and also because 'data' is
a bit too generic and might be confusing, especially since we have other
'data' fields in the code in various places.

12 years agosrd: Every callback should have a 'void *' parameter.
Uwe Hermann [Sat, 11 Feb 2012 21:38:17 +0000 (22:38 +0100)]
srd: Every callback should have a 'void *' parameter.

This is required in various situations and for various lib users,
especially so GUIs which might want to pass specific info via this
mechanism.

12 years agoUse g_try_malloc/g_free/g_strdup consistently.
Uwe Hermann [Sat, 11 Feb 2012 19:06:46 +0000 (20:06 +0100)]
Use g_try_malloc/g_free/g_strdup consistently.

Avoid plain malloc()/free() in sr/srd, especially in the API calls.
Also avoid g_malloc*() in favor of g_try_malloc*().

Use g_strdup() instead of strdup() so that we can use g_free()
consistently everywhere.

Exceptions: Stuff that is allocated via other libs (not using glib),
should also be properly free'd using the respective free-ing function
(instead of g_free()). Examples: Stuff allocated by libusb, libftdi, etc.

Also, use sr_err() instead of sr_warn() for actual errors. sr_warn() is
meant for non-fatal/uncritical warnings.

12 years agosrd: rename all instance to inst
Bert Vermeulen [Sat, 11 Feb 2012 17:06:56 +0000 (18:06 +0100)]
srd: rename all instance to inst

12 years agosrd: Update README.
Uwe Hermann [Fri, 10 Feb 2012 23:43:26 +0000 (00:43 +0100)]
srd: Update README.

12 years agosrd: s/python/Python/.
Uwe Hermann [Fri, 10 Feb 2012 08:29:38 +0000 (09:29 +0100)]
srd: s/python/Python/.

12 years agosrd: Add/improve g_malloc() error messages.
Uwe Hermann [Thu, 9 Feb 2012 23:06:58 +0000 (00:06 +0100)]
srd: Add/improve g_malloc() error messages.

12 years agosrd: Move private symbols to sigrokdecode-internal.h.
Uwe Hermann [Thu, 9 Feb 2012 18:17:54 +0000 (19:17 +0100)]
srd: Move private symbols to sigrokdecode-internal.h.

12 years agosrd: Add/use SRD_API/SRD_PRIV macros.
Uwe Hermann [Thu, 9 Feb 2012 18:11:53 +0000 (19:11 +0100)]
srd: Add/use SRD_API/SRD_PRIV macros.

This is not yet finished, more things should be made private.