Commit Graph

255 Commits

Author SHA1 Message Date
Uwe Hermann 719c5a934c Fix some compiler warnings. 2011-11-15 21:05:40 +01:00
Gareth McMullin 7583b99dbb OLS: Calculate actual sample rate used. 2011-10-31 11:19:10 +01:00
Uwe Hermann baf1d71477 ols: Minor whitespace and coding style fixes. 2011-10-30 02:10:32 +02:00
Gareth McMullin 3a4d09c0de Run-Length Encoding support for the OLS. 2011-10-30 01:56:54 +02:00
Gareth McMullin 221304219e Prevent reading past end of OLS hardware buffer. 2011-10-30 01:56:40 +02:00
Jerry 9a75102313 Mac OS X build fixes 2011-06-20 23:43:44 +02: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
Bert Vermeulen 8722c31e26 better cleanup of device/plugin resources 2011-06-05 01:51:49 +02:00
Uwe Hermann 896a19fd65 LA8: Remove trailing whitespace. 2011-05-09 01:04:44 +02:00
Uwe Hermann d1175d5f7e LA8: Use sr_spew() where appropriate. 2011-05-09 01:03:27 +02:00
Uwe Hermann f36cbf60cb LA8: Improve trigger support and debug output. 2011-05-09 01:03:27 +02:00
Uwe Hermann a76983fd20 LA8: Eliminate magic numbers. 2011-05-09 00:59:05 +02:00
Uwe Hermann 4d7b525ae9 LA8: Add trigger point support.
Report trigger point/position via SR_DF_TRIGGER packet.
2011-05-09 00:59:05 +02:00
Uwe Hermann 5a9660dd4e demo: Use memset(), might be faster. 2011-05-09 00:59:05 +02:00
Uwe Hermann c03ed39733 demo: Add all-low/all-high pattern support.
Also, improve error handling a bit.
2011-05-09 00:59:04 +02:00
Uwe Hermann c8f4624d9b demo: s/genmode/pattern/. 2011-05-05 13:06:15 +02:00
Uwe Hermann 0d31276b05 demo: Rename GENMODE_DEFAULT to GENMODE_SIGROK.
Also, add (Doxygen) comments for the currently supported patterns that
the demo device/driver can generate.
2011-05-05 13:06:15 +02:00
Uwe Hermann 68c12597ef demo: Eliminate unneeded tmp_u64. 2011-05-05 13:06:15 +02:00
Uwe Hermann d3b1b51cbe LA8: Free memory from g_*alloc*() via g_freee(). 2011-05-05 13:06:14 +02:00
Uwe Hermann 340cfac0f0 log messages: Use device name, not vendor name.
There can be multiple devices from the same vendor, obviously.
2011-05-05 13:06:14 +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 548b08e55c Drop unneeded skeleton files.
They're not too useful as they mostly consist of a list of function names,
and that list is already available in the respective struct. The wiki
API docs and the code in the various hardware/output drivers serve as
useful examples already, no need for additional files.
2011-05-05 13:06:12 +02:00
Uwe Hermann 86f5e3d826 libsigrok: Rename open/close to opendev/closedev. 2011-05-05 13:06:11 +02:00
Uwe Hermann 6f42226475 demo: Add some more debug output. 2011-05-02 01:40:16 +02:00
Uwe Hermann 4362438f1e LA8: Shrink mangled_buf from 8MB to 4KB.
It's not necessary to have an 8MB buffer. Also, make it static, don't
use malloc() here.
2011-04-25 00:21:41 +02:00
Uwe Hermann da0918aae0 ASIX: Small consistency fixes. 2011-04-25 00:21:40 +02:00
Uwe Hermann 4bc5fd4568 LA8: Eliminate unused num_probes variable. 2011-04-25 00:21:40 +02:00
Uwe Hermann 309397702f LA8: Replace some sr_warn() with sr_err(). 2011-04-25 00:21:40 +02:00
Uwe Hermann ecaf59db8d LA8: probeconfig/trigger support.
This should make proper trigger support work for ChronoVu LA8.
2011-04-25 00:21:39 +02:00
Uwe Hermann 4af22da595 Fix two small warnings. 2011-04-19 00:27:29 +02:00
Uwe Hermann e519ba8645 Hardware drivers: Use names for struct entries. 2011-04-19 00:18:06 +02:00
Uwe Hermann c0a4b9716d ols: Always use glib's memory allocation functions. 2011-04-19 00:18:05 +02:00
Uwe Hermann ecad043fd0 MSO19: Always use glib's memory allocation functions. 2011-04-19 00:18:05 +02:00
Uwe Hermann 27a3a6fe4b demo: Always use glib's memory allocation functions. 2011-04-16 18:08:18 +02:00
Uwe Hermann c548332c21 serial.c: Use g_try_malloc(). 2011-04-16 18:08:18 +02:00
Uwe Hermann 12ad53f5a6 ASIX Sigma: Improve error handling a bit. 2011-04-16 18:08:18 +02:00
Uwe Hermann 92b3101cfc alsa: Always use glib's memory allocation functions. 2011-04-16 18:08:17 +02:00
Uwe Hermann 2e82a17b5a LA8: Always use glib's memory allocation functions. 2011-04-16 18:08:17 +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 15f2d0c0f2 Don't close/reset the FTDI device too often.
Only call la8_close_usb_reset_sequencer() in hw_closedev(), it's not
needed in hw_stop_acquisition().

Thanks Ken Mobley of ChronoVu for the report.
2011-04-15 20:47:26 +02:00
Uwe Hermann 2f5c8c9696 LA8: free() sample buffers in hw_closedev().
Thanks Ken Mobley of ChronoVu for the report.
2011-04-15 20:05:45 +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 8703f512a7 LA8: Use the new SR_ERR_ARG macro. 2011-04-10 23:03:33 +02:00
Uwe Hermann f4314d7e06 Add initial support for the ChronoVu LA8. 2011-04-04 19:40:30 +02:00
Uwe Hermann 8a7b47cdfa Revert temporary changes for 0.2 release. 2011-04-03 23:18:46 +02:00
Uwe Hermann 2f3aab0ee9 Disable some stuff which should not be in 0.2.
Disable decoders, disable lib building.
2011-04-03 22:47:51 +02:00
Bert Vermeulen 4fe9a6da79 OLS driver overhaul
support for metadata in recent versions of the FPGA code
moved constants and structs out to separate header file
got rid of all device instance-specific globals
2011-04-03 06:18:05 +02:00
Uwe Hermann 82957b65b1 ASIX Sigma: Fix firmware loading bug.
When no firmware file is found, return the right error code so sigrok
doesn't continue running with no firmware loaded.

Thanks Martin Stensgård <mastensg@ping.uio.no> for the patch!
2011-03-25 13:44:16 +01: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 4cea9eb20d Make ARRAY_SIZE/ARRAY_AND_SIZE private.
This is not libsigrok-specific and should not be part of our API.
2011-02-20 21:16:26 +01:00
Uwe Hermann 54ac5277c5 Constify some more 'char *' parameters. 2011-02-20 21:16:26 +01:00
Uwe Hermann 809c5f2011 Add sr_ prefix for analog stuff some structs. 2011-02-20 21:16:24 +01:00
Uwe Hermann 6f1be0a2d4 Add sr_ prefix to session_{add,remove}. 2011-02-20 21:16:22 +01:00
Uwe Hermann 29cbfeaf5c Mark some private stuff 'static'. 2011-02-20 21:16:20 +01:00
Bert Vermeulen 4bfbf9fce7 demo: forgot second part of samplerate support 2011-02-12 06:14:37 +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 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 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
Bert Vermeulen d81d29333e demo: support setting sample rate 2011-02-04 06:29:41 +01:00
Bert Vermeulen 904e0b589e ols: default to 200KHz samplerate 2011-02-04 06:29:41 +01:00
Uwe Hermann a9f54bcd7b MinGW: Build fixes. 2011-02-02 13:13:26 +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
Bert Vermeulen cddd1c5f47 demo: stored-pattern generator now keeps state 2011-02-01 06:51:34 +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 da69237321 Build fix. 2011-01-23 18:21:58 +01:00
Bert Vermeulen 108a5bfbba fix compile warning on 32-bit platforms 2011-01-23 05:32:37 +01:00
Bert Vermeulen 070befcd1c restore demo driver to working state 2011-01-23 05:32:13 +01:00
Daniel Ribeiro cdbc51d97d alsa: hide a few compiler warnings 2011-01-22 12:24:12 -02:00
Daniel Ribeiro 58330ab892 finish alsa driver implementation
Yes, it works now.
2011-01-22 12:24:12 -02:00
Bert Vermeulen 6ea7e23526 Revert "re-enable filter and datastore for DF_LOGIC"
This reverts commit 23da86dfc0a89c7ab951fea31a318a493830eb69.
2011-01-22 14:18:31 +01:00
Daniel Ribeiro 921a4c741f fix copynpaste glitch 2011-01-22 01:01:53 -02:00
Daniel Ribeiro 6ed4f04437 initial version of alsa plugin.
It does NOT work yet.
2011-01-22 00:57:27 -02:00
Daniel Ribeiro cfd8b10a2e alphabetical order 2011-01-21 22:02:32 -02: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
Daniel Ribeiro 62eeeb171b re-enable filter and datastore for DF_LOGIC
This definitely isn't the proper fix, but it should allow DF_LOGIC
and DF_ANALOG to coexist.
2011-01-21 18:04:09 -02:00
Daniel Ribeiro 8038e90aef add a sine wave to demo.c 2011-01-21 12:52:12 -02:00
Daniel Ribeiro 764f887f7b change demo.c to output analog packets
You need to #define DEMO_ANALOG to generate DF_ANALOG packets.
2011-01-21 02:12:48 -02:00
Uwe Hermann bffed4fc10 Re-enable stuff we temporarily disabled for 0.1. 2011-01-20 00:43:57 +01:00
Uwe Hermann 07c81bfad1 Disable Link Instruments MSO-19 for 0.1. 2011-01-19 23:55:03 +01:00
Uwe Hermann 26ce0bbfd8 demo: Small indentation fix. 2011-01-19 23:47:21 +01:00
Håvard Espeland 1924f59f4b Demo: Obery samplerate and fix race condition. 2011-01-19 23:14:17 +01:00
Bert Vermeulen 576790ff7b disable MSO-19 specific stuff for 0.1 release 2011-01-19 22:58:09 +01:00
Uwe Hermann 058b70353d Move more non-public headers to sigrok-internal.h. 2011-01-19 01:16:19 +01:00