Commit Graph

672 Commits

Author SHA1 Message Date
Bert Vermeulen c532476aa7 sr: rename hwplugin functions to sr_thing_action format 2012-02-13 19:56:24 +01:00
Uwe Hermann e0c25ac99c sr: Add missing #include, fixes warning. 2012-02-13 19:49:09 +01:00
Uwe Hermann 57ab7d9f92 sr: cleanup callback: Return int. 2012-02-13 19:49:01 +01:00
Uwe Hermann 3010f21c91 sr: stop_acquisition callback: Return int. 2012-02-13 19:49:00 +01:00
Bert Vermeulen c73d2ea421 sr: adjust copyright year 2012-02-13 14:31:51 +01:00
Bert Vermeulen 031685005b sr: rename all sr_device_* functions to sr_dev_* 2012-02-13 14:00:47 +01:00
Bert Vermeulen a1645fcd81 sr: more API cleanup and documentation 2012-02-13 03:36:32 +01:00
Bert Vermeulen b2ff95063a sr: whitespace cleanup 2012-02-13 02:16:32 +01:00
Bert Vermeulen 996b0c7234 sr: clean up public/private split in headers 2012-02-13 02:13:51 +01:00
Bert Vermeulen 18beaeff94 sr: cleaned up session bus debug helper 2012-02-13 00:08:23 +01:00
Bert Vermeulen bb08ee2e53 sr: public/private API cleanup in hwplugin 2012-02-12 23:57:43 +01:00
Bert Vermeulen 6cfa474a80 sr: rm unused sr_device_clear() and sr_device_probe_clear() 2012-02-12 22:36:19 +01:00
Bert Vermeulen 040ae8be94 sr: sigrok.h is no longer generated 2012-02-12 20:43:20 +01:00
Uwe Hermann 133a37bfba 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.
2012-02-11 22:34:16 +01:00
Uwe Hermann cd853ff0b2 sr: chronovu-la8: Add missing <stdlib.h> #include. 2012-02-11 00:39:25 +01:00
Uwe Hermann 8c4b600393 sr: asix: Change a free() to g_free() as it should be.
This also fixes a compiler warning (on FreeBSD at least).
2012-02-11 00:38:48 +01:00
Uwe Hermann 44b6aafdb7 sr: FreeBSD has zlib, but no pkg-config file for it. 2012-02-11 00:34:16 +01:00
Uwe Hermann bf3f06c9c2 sr: MinGW/Mac: No libusb_detach_kernel_driver() support. 2012-02-11 00:20:23 +01:00
Uwe Hermann 12f3e8741b sr: Doxygen comments for loglevels. 2012-02-10 09:30:40 +01:00
Uwe Hermann 0ae67ff784 sr: Implement proper logging framework.
This is pretty much identical to the current libsigrokdecode API/framework.
2012-02-10 09:30:40 +01:00
Uwe Hermann d38cd6c1f6 sr: saleae: Fix typo. 2012-02-07 23:56:33 +01:00
Uwe Hermann 003f9bebf9 sr: saleae: Support more recent firmwares. 2012-02-07 23:56:33 +01:00
Uwe Hermann c32cc2504b sr: udev file: Add QuantAsylum QA100, Rigol VS5202D. 2012-02-06 23:50:22 +01:00
Uwe Hermann 6578321848 sr: s/z60_sigrok.rules/z60_libsigrok.rules/. 2012-02-06 22:46:22 +01:00
Uwe Hermann 7c1d391c8b sr: input/output: Mark more symbols with SR_PRIV. 2012-02-05 15:05:13 +01:00
Uwe Hermann 0f8522bf74 Project-wide consistent naming for #include guards.
Document the naming scheme in HACKING.
2012-02-05 15:05:13 +01:00
Uwe Hermann 5c64390e5a sr/cli/gtk: Remove analog left-overs from API.
This will come back in some form or another later, but for now
don't clutter the API with non-working stuff. Removing stuff from APIs
is not possible without breaking the API, adding stuff later is simpler.
2012-02-05 15:05:12 +01:00
Uwe Hermann e7ee300a12 sr: zeroplus: Drop unused global variable. 2012-02-05 13:37:02 +01:00
Uwe Hermann 3d2efd7d15 sr: Compile fix for Windows/MinGW. 2012-02-05 13:36:03 +01:00
Uwe Hermann dff75c0df1 autogen.sh: aclocal support for Windows XP/Vista/7. 2012-02-05 12:54:44 +01:00
Uwe Hermann ca070ed9a0 sr: Make more symbols private via static/SR_PRIV.
Additional zeroplus fixes:

 - Remove unneeded function prototypes from .h files.

 - Remove unused variables and/or use standard libusb #defines instead.

 - Remove unused GL_* error code #defines.
2012-02-02 21:46:10 +01:00
Uwe Hermann 185ae2c5c9 sr: zeroplus: Remove unused gl_open()/gl_close().
Merge the missing function calls into zeroplus.c's init functions.
2012-02-02 21:46:10 +01:00
Uwe Hermann 1a081ca67d sr: Mark API functions with SR_API/SR_PRIV.
Use SR_API to mark public API symbols, and SR_PRIV for private symbols.

Variables and functions marked 'static' are private already and don't
need SR_PRIV. However, functions which are not static (because they need
to be used in other libsigrok-internal files) but are also not meant to
be part of the public libsigrok API, must use SR_PRIV.

This uses the 'visibility' feature of gcc (requires gcc >= 4.0).

Details: http://gcc.gnu.org/wiki/Visibility
2012-02-02 00:03:17 +01:00
Bert Vermeulen 0146970797 sr: remove unused time/duration fields from datafeed packets 2012-02-01 02:59:41 +01:00
Uwe Hermann 69890f7399 sr: Eliminate usb/serial instances from API.
The API should be generic and only provide sr_device_instance_new() and
friends, but not sr_usb_device_instance_new(), sr_serial_device_instance_new(),
or others for other device types we may have in the future. The
frontends shouldn't have to know or care about this implementation detail.

This also fixes the problem that parts of sigrok.h contained
'#ifdef HAVE_LIBUSB_1_0' and such, which is even less desirable for the API.

The usb/serial instance specifics are now private, and each driver that
needs them keeps a pointer in its driver-specific context.
2012-01-31 02:04:35 +01:00
Uwe Hermann c31e9ef49b sr: zp: Add missing <string.h> #include. 2012-01-31 01:54:08 +01:00
Anatoly Sokolov fd9836bfab Add sr_device_get_info 2012-01-30 13:56:38 +01:00
Uwe Hermann bf43ea2317 sr: zeroplus: Use device-specific context.
Make the zeroplus driver use a "struct zp" with per-device-instance
data (such as samplerate, trigger settings, and so on), like the other
drivers do.

Also, add a few more error checks.
2012-01-29 19:19:38 +01:00
Uwe Hermann ae32d7d759 sr: la8: Fix typo. 2012-01-29 19:19:38 +01:00
Uwe Hermann 73017cf914 sr: zeroplus: Fix a segfault. 2012-01-28 23:29:28 +01:00
Uwe Hermann ef7228ba49 Update/enforce/document our build requirements. 2012-01-28 21:26:56 +01:00
Uwe Hermann fb93625d1a sr: sigrok.h.in: Set SR_HWCAP_DUMMY to 0 explicitly. 2012-01-28 19:42:04 +01:00
Uwe Hermann 660ef7d730 sr: sigrok.h.in: Drop obsolete 'GSList *analyzers'. 2012-01-28 19:40:05 +01:00
Uwe Hermann a4cfb10f7f sr: Drop analog left-overs from sigrok.h.
For now, there's no analog/scope support in sigrok yet (will be added
later), so remove any such items from the public API (sigrok.h).

Having '#if defined(HAVE_LA_ALSA)' in sigrok.h is a bug anyway, the API
must not have anything device-dependent in general, and sigrok.h
specifically must not have any #ifdefs for specific hardware.
2012-01-28 19:23:09 +01:00
Anatoly Sokolov a141db8c4a add SR_HWCAP_DEMO_DEVICE capability 2012-01-21 15:56:29 +01:00
Renato Caldas f020a99773 link-mso19: Fixed led toggling (the bit masking was not being proprly done). 2012-01-19 11:12:01 +00:00
Renato Caldas e084a8042e link-mso19: Prevent double free errors when freeing sdi->priv. 2012-01-19 11:12:01 +00:00
Renato Caldas 357285a944 link-mso19: Add debug messages. 2012-01-19 11:12:01 +00:00
Renato Caldas a29360733d link-mso19: Properly initialize the protocol trigger block 2012-01-19 11:12:01 +00:00
Renato Caldas a84671913e link-mso19: Added new register definitions and renamed variables to reflect new findings. 2012-01-19 11:12:01 +00:00