Uwe Hermann
e7eb703fff
sr: opendev/closedev -> dev_open/dev_close.
2012-02-18 11:57:43 +01:00
Uwe Hermann
8105505d06
sr: s/st*_acquisition/acquisition_st*/.
2012-02-18 11:46:51 +01:00
Uwe Hermann
5097b0d091
sr/cli/gtk/qt: s/get_dev_info/dev_info_get/.
2012-02-18 11:41:21 +01:00
Uwe Hermann
a7d05fcb38
sr/cli/gtk/qt: s/configuration/config/.
2012-02-18 00:31:35 +01:00
Uwe Hermann
ffedd0bf5d
sr/cli/gtk: s/capability/hwcap/.
2012-02-18 00:17:18 +01:00
Uwe Hermann
1d9a8a5fe1
sr/cli/gtk: A few more s/instance/inst/.
2012-02-17 23:55:27 +01:00
Uwe Hermann
bb7ef79377
sr/cli/gtk/qt: s/device/dev/ in many places.
...
Also, a few s/instance/inst/ occurences.
2012-02-17 23:47:00 +01:00
Uwe Hermann
d68e2d1a21
sr: Some more s/device_instance/dev_inst/.
2012-02-17 22:40:51 +01:00
Uwe Hermann
7b48d6e104
sr: Prefix log messages with subsystem string.
2012-02-17 22:40:51 +01:00
Bert Vermeulen
9fc6aa0a56
sr: la8: remove debug output when no device is found
2012-02-14 13:18:17 +01:00
Bert Vermeulen
341ce41545
sr: don't free driver-specific per-device struct in drivers
...
sr_dev_inst_free() takes care of that.
2012-02-14 12:26:22 +01:00
Bert Vermeulen
da1466d677
sr: rename more functions to sr_thing_action format
...
Also improved the interface to find capabilities in a hardware plugin.
2012-02-14 00:23:51 +01:00
Bert Vermeulen
d3683c42e7
sr: rename all sr_device_instance_* functions to sr_dev_inst_*
2012-02-13 22:45:49 +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
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
bf3f06c9c2
sr: MinGW/Mac: No libusb_detach_kernel_driver() support.
2012-02-11 00:20:23 +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
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
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
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
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
Renato Caldas
80aa5f23d1
link-mso19: Added struct definitions for the pattern generator config and the protocol trigger config.
2012-01-19 11:12:01 +00:00
Uwe Hermann
42eb54fb62
mso-19: Fix whitespace.
2012-01-06 01:05:55 +01:00
Renato Caldas
d88b939324
link-mso19: fixed segmentation fault.
2012-01-06 01:01:57 +01:00
Renato Caldas
e42ef08dba
link-mso19: Updated to the current structs (fixed compilation).
2012-01-06 01:01:54 +01:00
Uwe Hermann
db8ae7b941
sr/srd: Remove/fix non-applicable autotools stuff.
2011-12-30 11:14:24 +01:00
Uwe Hermann
c37d2b1ba1
probe names: Fix cosmetics, add docs, fix off-by-one.
2011-12-29 19:50:14 +01:00
Kristoffer Sjöberg
464d12c72a
Move the probe naming to the creator of the device, and let each driver name its own probes.
2011-12-29 17:04:31 +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
Uwe Hermann
25a605d187
libsigrok: Quickfix for a segfault in ChronoVu LA8.
2011-12-04 18:33:29 +01:00
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
Uwe Hermann
cc8a7d250c
Add missing #includes to avoid clang warnings.
2011-11-24 22:42:02 +01:00
Bert Vermeulen
e7bad06355
la8: device not found during init() scan is not an error
...
fix some hardware plugin semantics
2011-11-20 03:19:06 +01:00
Gareth McMullin
4d436e71ba
Changed SR_T_NULL to SR_T_BOOL and adjusted RLE option.
2011-11-19 13:41:41 +13:00
Uwe Hermann
6bb5c5fadf
Consistently use __func__ instead of __FUNCTION__.
...
The __func__ form is standardized and more portable.
2011-11-17 23:47:45 +01:00
Uwe Hermann
a562c3a2e5
libsigrok: Use sr_err() et al instead of printf.
2011-11-17 23:47:45 +01:00
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
Uwe Hermann
01bd1ed396
Fix compiler warning.
2011-01-19 00:46:54 +01:00
Håvard Espeland
94ba4bd689
Sigma: Update set_configuration to reflect API.
2011-01-18 23:12:57 +01:00
Håvard Espeland
7c70c53843
Sigma: Set default samplerate to 200 KHz.
2011-01-18 22:39:46 +01:00
Håvard Espeland
5b5ea7c6d2
Sigma: Only send trigger packet if enabled.
...
The Sigma hardware emits a default trigger event.
2011-01-18 22:24:23 +01:00
Håvard Espeland
abda62ced8
Sigma: Never send empty packets.
2011-01-18 22:17:43 +01:00
Bert Vermeulen
b9cc36296b
demo driver: support time limit
2011-01-17 02:20:52 +01:00
Bert Vermeulen
574ce4988a
refuse to set sample limit under 4 (protocol can't handle it)
...
also a bit of whitespace mangling.
2011-01-17 02:18:02 +01:00
Håvard Espeland
88c51afe87
Sigma: Support for decoding partial chunks.
...
Samples are stored in chunks and the last samples do not fill up
a complete chunk. This patch adds support for decoding partial
chunks.
2011-01-16 17:05:14 +01:00
Uwe Hermann
10c471ab13
Fix warnings.
2011-01-16 14:18:26 +01:00
Uwe Hermann
d35aaf0256
demo: Use GIOChannels, makes it work on MinGW.
2011-01-16 14:12:52 +01:00
Håvard Espeland
98b8cbc17e
Sigma: Limit number of edge triggers to 1.
...
Actually, Sigma supports 2 rising/falling triggers,
but they are ORed and the current trigger syntax
does not permit ORed triggers.
2011-01-15 20:01:00 +01:00
Håvard Espeland
31facdd3c5
Sigma: Download samples from partial chunks.
2011-01-15 19:20:31 +01:00
Håvard Espeland
9996570987
Sigma: Move sigma state to device specific struct
...
Thanks to Daniel Ribeiro for contributing this patch. Some
modifications were done.
Not tested on multiple Sigmas, because of lack of hardware.
2011-01-15 17:04:21 +01:00
Uwe Hermann
1483577eed
Start moving private stuff to sigrok-internal.h.
...
This is work-in-progress, unfinished.
2011-01-15 15:57:54 +01:00
Uwe Hermann
c2bd92ec08
Slightly more consistent #include-guard naming.
2011-01-15 14:48:21 +01:00
Bert Vermeulen
917e0e71d5
added example code for generating a stored pattern
2011-01-15 14:28:39 +01:00
Håvard Espeland
9be9893eed
Sigma: Check state in hw_closedev
...
If the device is closed without previously running hw_openedev
the driver crashes (happens in cleanup). This patch checks
if the device has been opened.
2011-01-15 14:13:23 +01:00
Uwe Hermann
02440dd88c
demo: Cosmetics, constify.
2011-01-15 13:06:04 +01:00
Bert Vermeulen
e15f48c268
cleaned up demo driver
...
removed unused samplerate
added patternmode (random and incremental)
2011-01-15 05:12:41 +01:00
Uwe Hermann
63570167d6
Cosmetics for the -D output.
2011-01-15 03:44: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
Uwe Hermann
2119ab0364
MinGW/Windows: Serial port portability fixes.
...
Add serial_read()/serial_write() which have different implementations on
MinGW/Windows.
Add some more error code handling and documentation.
2011-01-12 01:09:31 +01:00
Olivier Fauchon
ba3d481bb7
add ontinuous mode for demo driver
2011-01-12 00:25:15 +01:00
Uwe Hermann
a61b0e6a35
configure: Add --enable-demo option.
2011-01-11 22:17:33 +01:00
Uwe Hermann
1fdb75e145
MinGW: Quickfix to make serial.c/ols.c compile.
...
Note: It does NOT actually work, yet, it only compiles!
2011-01-11 01:27:16 +01:00
Bert Vermeulen
74b9b43836
cli: support --continuous option for continuous sampling
2011-01-11 00:38:15 +01:00
Uwe Hermann
8a839354c1
Cosmetics, whitespace, consistency fixes.
2011-01-10 23:20:37 +01:00
Uwe Hermann
fc96e6f8c8
demo: Add missing copyright line.
2011-01-10 22:49:38 +01:00
Daniel Ribeiro
01cf881494
Add incomplete mso-19 plugin
...
* Both Analog and Logic capture works.
* Analog values are raw ADC, still useless.
* Triggers aren't implemented.
* Pattern Generator not implemented.
* Everything is broken. :)
2011-01-10 15:15:51 -02:00
Daniel Ribeiro
c2616fb9fa
update plugins and cli to use new DF_HEADER
2011-01-10 15:12:38 -02:00
Daniel Ribeiro
ac4a2ea45a
serial.c: fix parity != none
...
The flag write was wrong
2011-01-10 15:05:14 -02:00
Daniel Ribeiro
1ff7712c93
Finish serial_set_params implementation
...
Adds the most common baud rates and support bits, parity, stopbits
and flocontrol settings.
2011-01-10 02:21:07 -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
af812219f6
Only build specific source files if needed.
2011-01-08 20:58:44 +01:00
Uwe Hermann
7c17ac6cc4
Only build hardware drivers if they're enabled.
2011-01-08 20:58:43 +01:00
Uwe Hermann
5096c6a6c1
demo driver: Small cleanups, error handling.
2011-01-08 20:58:42 +01:00
Uwe Hermann
85b5af0687
Make the demo driver work.
...
When initialized, the driver starts a thread that generates signal data.
This data is written to a pipe (write file descriptor).
The other end of the pipe (read file descriptor), is connected to the
main polling code, like any other driver.
Note: This patch adds a new dependency on libgthread.
At the moment, you can list the driver's device:
$ ./cli/sigrok-cli -D
The following devices were found:
ID Device
0 Sigrok project Demo Driver v1.0 with 8 probes
And use it for random signal generation:
$ /opt/sigrok/bin/sigrok-cli -d 0 --samples 50 -f bits -p 1-8
sigrok 0.1pre2
Acquisition with 8/8 probes at 0 Hz
1:10111100 11010110 00001011 00011110 00111010 11110100 10
2:11010110 00111111 01001010 11111101 11010011 00010010 11
3:11000101 01000001 10100011 10100100 10110000 11110011 00
4:00100111 11110100 10011101 01100111 00100101 01001110 10
5:00011100 00101100 10111000 11001101 01011101 01011011 01
6:10110101 10111110 10010110 10111000 11011010 10000100 11
7:11111111 01001111 11110110 11010010 10000101 01001111 00
8:01000101 01111110 01010111 00000111 00010010 00000101 11
The next step is to make demo driver customisable (per-probe signal clock,
reference sample signals : serial, I2C, CAN...).
Thanks Olivier Fauchon <olivier@aixmarseille.com> for the patch.
2011-01-08 18:29:10 +01:00
Uwe Hermann
5e2ddeb098
Fix two more compiler warnings noticed on amd64.
2011-01-08 03:51:31 +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
Uwe Hermann
6239c175c1
Initial, unfinished demo/simulation hardware driver.
2011-01-06 19:16:47 +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
f0551a6543
oops, fix serial_flush()
2010-08-12 06:04:44 +02:00
Bert Vermeulen
06d64eb880
add serial_flush()
2010-08-12 06:02:25 +02:00
Bert Vermeulen
a143e4e5dd
don't push configuration to device until acq time
2010-08-12 04:57:09 +02:00
Bert Vermeulen
f0d1b53e56
OLS: fix multi-channel capture
2010-08-11 18:37:09 +02:00
Bert Vermeulen
edc508d49c
add debug logging (set SIGROK_DEBUG=2 to see)
2010-08-11 04:04:20 +02:00
Bert Vermeulen
a803c0db4d
OLS: fix triggers, sample order, capture ratio
2010-08-05 03:54:33 +02:00
Bert Vermeulen
b5698bd71e
saleae logic: fix triggers after style changes
2010-07-18 21:57:27 +02:00
Uwe Hermann
38ba252251
Use 'kHz' (not 'KHz') consistently.
2010-05-27 01:51:55 +02:00
Uwe Hermann
5013f07422
skeleton.c: Update to latest prototypes.
2010-05-20 23:41:34 +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
Peter Stuge
5b15b41e62
sump/ols: Wait 10ms for hw response to make pl2303 reliable
2010-05-09 23:11:08 +02:00
Peter Stuge
71dda10656
serial: Remove unneccesary nesting
2010-05-09 23:10:23 +02:00
Håvard Espeland
bdfc7a8974
Sigma: Small cleanups.
2010-05-03 22:01:03 +02:00
Håvard Espeland
36b1c8e61b
Sigma: Use software trigger to pinpoint exact sample.
2010-05-03 21:32:03 +02:00
Håvard Espeland
6aac77375b
Sigma: Add state machine for tracking Sigma status.
2010-05-03 19:04:10 +02:00
Håvard Espeland
a42aec7f6e
Sigma: Merge storage of rise/fall triggers.
2010-05-03 15:06:43 +02:00
Håvard Espeland
4ae1f45136
Sigma: Minor cleanups.
2010-05-02 21:59:14 +02:00
Håvard Espeland
11fc8d9d93
Sigma: Set capture ratio correctly.
2010-05-02 21:59:14 +02:00
Håvard Espeland
c53d793f03
Sigma: 50 MHZ falling/rising edge trigger support.
...
Falling/rising edge and value/mask triggers can be combined, e.g.:
--triggers 1=0,2=r,3=1,4=1
2010-05-02 16:32:24 +02:00
Håvard Espeland
f758d0744d
Sigma: Fix simple trigger LUT calculation.
2010-05-02 13:00:41 +02:00
Håvard Espeland
ee492173a1
Sigma: Value/mask trigger support in 50 MHz mode.
2010-05-01 23:16:27 +02:00
Håvard Espeland
eec5275e2f
Sigma: Small cleanups.
2010-05-01 23:16:18 +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
Håvard Espeland
57bbf56b84
Sigma: Add triggers support for 100 and 200 MHz.
2010-05-01 00:00:57 +02:00
Håvard Espeland
ed09fd07f7
Sigma: Minor cleanup and add more samplesrates.
2010-04-30 23:54:14 +02:00
Uwe Hermann
9ddb2a125d
Sigma: Small cosmetic fixes.
2010-04-29 00:32:44 +02:00
Håvard Espeland
edca2c5c22
Sigma: Support for low samplerates
...
Lowest samplerate supported in driver is 250 KHz
2010-04-28 22:45:13 +02:00
Håvard Espeland
f78898e947
Sigma: Support 50 and 200 MHz modes
2010-04-28 21:24:41 +02:00
Håvard Espeland
a8116d764b
Sigma: Rename firmware files
2010-04-28 21:20:27 +02:00
Håvard Espeland
e8397563a2
Sigma: Upload 50, 100 or 200 MHz firmware
2010-04-28 20:01:15 +02:00
Håvard Espeland
f6564c8d19
Sigma: Move upload firmware into a function
2010-04-28 19:51:13 +02:00
Uwe Hermann
fefa18001a
ASIX SIGMA: Coding style fixes (via indent mostly).
...
Also, end all/most comments with full stop and avoid variable/array
definitions in the middle of functions.
2010-04-28 00:17:28 +02:00
Uwe Hermann
204b1629bd
asix-sigma.h: Add missing license header.
2010-04-27 22:46:59 +02:00
Uwe Hermann
911f18341b
ASIX Sigma: Use common license header format.
2010-04-27 22:44:15 +02:00
Håvard Espeland
28a35d8ab3
This commit adds initial support for the Asix Sigma Logic Analyzer. Currently, only 200 MHz is supported, and only with software trigger. Firmware for the device will be distributed separately, with permission from the vendor.
...
Signed-off-by: Håvard Espeland <gus@ping.uio.no>
2010-04-27 13:16:01 -07:00
Uwe Hermann
926b866cb6
Win: Fix compile, serial port code (unfinished).
2010-04-22 03:39:02 +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
9a4988343f
Oops, bugfixes.
2010-04-15 23:24:44 +02: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
Uwe Hermann
43fc7885d3
OLS: Coding style fixes.
2010-04-15 22:16:35 +02:00
Uwe Hermann
986f7270bf
hardware/common: Coding style fixes.
2010-04-15 20:55:57 +02:00
Uwe Hermann
fdd20b5239
Add ARRAY_SIZE helper.
2010-04-13 00:34:20 +02:00
Uwe Hermann
afc8e4deb6
Fix all warnings and re-enable -Wextra.
2010-04-09 22:18:46 +02:00
Uwe Hermann
86c5e27908
zeroplus: Fix compiler warnings.
2010-04-09 21:20:22 +02:00
Uwe Hermann
08cfe6a2b7
Factor out trigger_helper() to reduce nesting.
2010-04-09 21:16:11 +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
904299164f
sl_open_device(): Refactoring to reduce nesting.
2010-04-09 20:31:43 +02:00
Uwe Hermann
f6958dabcd
Simplify code by reducing nesting level.
2010-04-09 19:25:29 +02:00
Uwe Hermann
6f5f21f996
Coding style fixes, aided by 'indent'.
...
The following shell alias can be used:
alias INDENT='indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs'
2010-04-09 19:04:36 +02:00
Bert Vermeulen
d02a535e05
move posix-specific serial port comms to serial.c
2010-04-09 05:15:27 +02:00
Bert Vermeulen
54dc4bc703
switch to SIGROK_ERR
2010-04-08 16:58:07 +02:00
Bert Vermeulen
6937bb757e
various fixes, basic acquisition works
2010-04-08 16:54:06 +02:00
Bert Vermeulen
54b38f64aa
use strdup() instead of g_strdup()
2010-04-08 16:50:27 +02:00
Uwe Hermann
e31b636df6
Start unification of libsigrok return codes.
...
We have SIGROK_OK for functions calls where no errors occured. All
error code names start with SIGROK_ERR and are globally unique,
negative values.
The value SIGROK_ERR is a generic/unspecified error code, all others,
such as SIGROK_ERR_MALLOC, refer to a specific error condition.
This commit renames the old SIGROK_NOK etc.
2010-04-05 18:30:14 +02:00
Uwe Hermann
4c100f3244
More consistent spelling of "samplerate".
2010-04-05 18:30:02 +02:00
Uwe Hermann
a1bb33afbd
Start of code base layout restructuring.
2010-04-02 20:27:54 +02:00