Commit Graph

13 Commits

Author SHA1 Message Date
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
Uwe Hermann b7f09cf86d libsigrok: Fix #includes.
In the lib, we should only #include "sigrok.h" or "sigrok-internal.h",
but not the (possibly installed and thus different/older versions) via
<sigrok.h> or <sigrok-internal.h>.

Frontends should of course use <sigrok.h> and <sigrok-internal.h>.
2011-12-28 23:07:08 +01:00
Uwe Hermann a0ecd83bc6 Make more variables/functions static and non-global.
The 'GSList *devices' from device.c was actually really global (i.e.,
listed in sigrok.h), which is now fixed.
2011-12-28 22:55:21 +01:00
Bert Vermeulen 6d754b6d3a support for multiple FX2 devices 2011-06-12 18:04:19 +02:00
Bert Vermeulen e10d6e32e4 saleae-logic: support for other FX2 devices (bare FX2)
This enables support for devices that have a different VID/PID
than the Saleae Logic, and yet another after firmware upload.

After firmware upload is checked every 100ms whether it came back,
instead of always waiting for 2 seconds.

If the kernel attaches a driver to a device we know, detact it first.
2011-06-05 01:57:54 +02:00
Uwe Hermann b08024a836 libsigrok: Introduce sr_dbg/sr_info/sr_warn/sr_err.
We should use these (internal) functions in libsigrok exclusively from
now on, i.e. no more use of glib's g_debug() etc.

These functions are only for libsigrok, the frontends use whatever
logging mechanism is suitable there.
2011-04-14 10:11:08 +02:00
Uwe Hermann 3bbd9849e9 Fix warnings: g_fopen() needs <glib/gstdio.h>. 2011-02-06 02:14:57 +01:00
Uwe Hermann 868d8cefec Use glib's g_fopen() instead of fopen(). 2011-02-05 20:03:17 +01:00
Uwe Hermann 45fdfa307d MinGW: Use "b" in all fopen() calls.
This is required for proper operation on Windows/MinGW, and doesn't
affect other OSes, most POSIX systems simply ignore the "b".
2011-02-04 23:52:16 +01:00
Uwe Hermann 986f7270bf hardware/common: Coding style fixes. 2010-04-15 20:55:57 +02:00
Uwe Hermann edf60d0575 Factor out common ezusb_upload_firmware(). 2010-04-09 20:44:51 +02:00
Uwe Hermann 9d2933fbe9 ezusb.c: Coding style fixes. 2010-04-09 20:36:29 +02:00
Uwe Hermann a1bb33afbd Start of code base layout restructuring. 2010-04-02 20:27:54 +02:00