Commit Graph

59 Commits

Author SHA1 Message Date
Uwe Hermann cb93f8a927 Other method to avoid "unused var" compiler warnings.
The '(void)varname' method is nicer than 'varname = varname' and also
prevents warnings when compiling sigrok with clang instead of gcc.
2011-11-24 22:57:48 +01:00
Bert Vermeulen a634574eae saleae-logic: fix timing on packets when triggering is used 2011-06-20 11:43:34 +02:00
Bert Vermeulen 9c939c5132 use new datafeed packet format 2011-06-19 14:28:50 +02:00
Bert Vermeulen 6d754b6d3a support for multiple FX2 devices 2011-06-12 18:04:19 +02:00
Bert Vermeulen e53c830f33 saleae-logic: use new logging system 2011-06-05 02:08:08 +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 697785d1ae libsigrok: closedev() now has a return code.
This is useful to allow frontends to react upon close failures in a
way they see fit (e.g. a popup in the GUI, or error message in the CLI).
They can also still ignore the error if they want, of course.
2011-05-05 13:06:14 +02:00
Uwe Hermann 86f5e3d826 libsigrok: Rename open/close to opendev/closedev. 2011-05-05 13:06:11 +02:00
Uwe Hermann e519ba8645 Hardware drivers: Use names for struct entries. 2011-04-19 00:18:06 +02:00
Uwe Hermann b53738baf7 Replace g_malloc{0,} with g_try_malloc{0,}.
The g_malloc()/g_malloc0() versions exit/segfault if not enough memory
is available, which is not a good thing in libsigrok.

Instead, we use the g_try_malloc()/g_try_malloc0() variants, which
return NULL if not enough memory is available, so that the caller can
handle the error properly.
2011-04-16 18:08:15 +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 c91404191e Add SR_HZ macro for consistency. 2011-03-03 20:24:24 +01:00
Uwe Hermann 59df0c77e2 Add SR_ prefix to the KHZ/MHZ/GHZ macros. 2011-03-03 20:24:24 +01:00
Uwe Hermann 54ac5277c5 Constify some more 'char *' parameters. 2011-02-20 21:16:26 +01:00
Uwe Hermann 6f1be0a2d4 Add sr_ prefix to session_{add,remove}. 2011-02-20 21:16:22 +01:00
Uwe Hermann e5d1717e6d Saleae: Make more private stuff static. 2011-02-09 00:07:29 +01:00
Uwe Hermann 60679b18e6 Add sr_ prefix to 'struct samplerates'. 2011-02-08 22:28:01 +01:00
Uwe Hermann 8a2efef2d5 Add sr_ prefix to session related API functions. 2011-02-08 22:28:00 +01:00
Uwe Hermann 1afe89897c Add sr_ prefix for 'struct probe'. 2011-02-08 22:27:58 +01:00
Uwe Hermann 0f33365007 Revert FIRMWARE_DIR / DECODERS_DIR method for now.
There were several issues with the other method, revert for now.
2011-02-04 20:38:20 +01:00
Uwe Hermann 22b0238344 Fix build when no libusb-LA is compiled.
Until now the build would break if the user doesn't enable at least one
of the libusb1.0-based LAs. I.e., you could not compile only OLS, or
only the demo driver.
2011-02-02 10:25:52 +01:00
Uwe Hermann 5a2326a71b SR_ prefix for all public enums. 2011-01-30 18:32:59 +01:00
Uwe Hermann 6c29007211 Prefixes for *_device_instance. 2011-01-30 18:32:59 +01:00
Uwe Hermann 5c2d46d1db Prefix device structs with sr_. 2011-01-30 18:32:58 +01:00
Uwe Hermann 9f8274a544 Add a field for the full name of a device.
Also, show this long/full name in 'sigrok-cli -V'.
2011-01-30 18:32:58 +01:00
Uwe Hermann b9c735a275 Prefix datafeed structs with sr_. 2011-01-30 18:32:57 +01:00
Uwe Hermann d32d961d17 get_sr_device_instance() -> sr_get_device_instance(). 2011-01-30 18:32:56 +01:00
Uwe Hermann a00ba01228 Change all sigrok_ prefixes to sr_. 2011-01-30 18:32:55 +01:00
Uwe Hermann e46b8fb154 Change SIGROK_ prefix to SR_. 2011-01-30 18:32:53 +01:00
Uwe Hermann 5819184b22 Remove duplicate FIRMWARE_DIR includes.
We use AC_DEFINE_UNQUOTED in configure.ac now to put the FIRMWARE_DIR #define
in the config.h file, which is included where we need the #define.
2011-01-21 21:14:37 +01:00
Uwe Hermann 058b70353d Move more non-public headers to sigrok-internal.h. 2011-01-19 01:16:19 +01:00
Uwe Hermann 17e1afcb81 Whitespace and consistency fixes.
Also, drop a <poll.h> #include. It's unused anyway, and breaks the build
on MinGW/Windows as there is no poll.h there.
2011-01-13 23:52:25 +01:00
Bert Vermeulen 74b9b43836 cli: support --continuous option for continuous sampling 2011-01-11 00:38:15 +01:00
Daniel Ribeiro c2616fb9fa update plugins and cli to use new DF_HEADER 2011-01-10 15:12:38 -02:00
Bert Vermeulen 4c046c6bcc change all DF_LOGIC* to a single DF_LOGIC type
The datafeed packet has a new field 'unitsize' to denote the number of
bytes per sample in the payload.
2011-01-09 06:32:38 +01:00
Uwe Hermann 7c17ac6cc4 Only build hardware drivers if they're enabled. 2011-01-08 20:58:43 +01:00
Uwe Hermann 340f6e7aea Fix out-of-tree build.
Use libtool "noinst" local helper libs and use one Makefile.am per
subdir, which is the usual/preferred method. These helper libraries are
purely local and will not be installed.

This also fixes out-of-tree builds of sigrok, i.e. building in a
directory other than the sigrok source directory, e.g.

 $ cd /home/user
 $ git clone ...sigrok
 $ cd sigrok
 $ ./autogen.sh
 $ mkdir /tmp/foo
 $ cd /tmp/foo
 $ /home/user/sigrok/configure
 $ make
 $ make install

This will place all build results (.o files, .la files, etc) in the
local build directory (/tmp/foo) instead of the source directory
(/home/user/sigrok in this example). The installation directory is
selected via the --prefix configure option (/usr/local per default).
2011-01-08 03:32:25 +01:00
Bert Vermeulen e6ac9ac808 consistent debug msgs, rename sump to ols 2010-12-29 00:02:30 +01:00
Bert Vermeulen a5e18535ad don't turn on/off libusb debugging 2010-12-27 23:49:46 +01:00
Bert Vermeulen b5698bd71e saleae logic: fix triggers after style changes 2010-07-18 21:57:27 +02:00
Bert Vermeulen 2458ea6514 use flexible sample limit specification (k/m/g)
HWCAP_LIMIT_SAMPLES is now passed to the driver as *uint64
2010-05-19 21:34:22 +02:00
Uwe Hermann 989938f6cd Cosmetics: Reduce nesting level a bit. 2010-05-18 00:05:10 +02:00
Uwe Hermann 9a5c6dcf49 Factor out opendev2/opendev3. 2010-05-18 00:05:10 +02:00
Uwe Hermann 5e59f47615 opendev2/opendev3: Don't depend on global vars. 2010-05-18 00:05:09 +02:00
Uwe Hermann 28fc6de055 Cosmetics. 2010-05-18 00:05:09 +02:00
Uwe Hermann e65679b15e Saleae: Rename firmware file to saleae-logic.fw.
This is done for consistency with the ASIX SIGMA firmware file names,
and also for brevity.
2010-05-01 02:41:37 +02:00
Bert Vermeulen eee4890f2f fix broken samplerate calculation 2010-04-17 23:11:58 -07:00
Bert Vermeulen 9c48090a88 fix double DF_END and libusb timeout 2010-04-17 23:11:57 -07:00
Uwe Hermann 408e719989 Refactoring and code simplifications. 2010-04-15 23:21:30 +02:00
Uwe Hermann fed16f06e2 Saleae/Zeroplus: Coding style fixes. 2010-04-15 22:59:43 +02:00