Uwe Hermann
c5d660ae24
Drop unused 'global' struct/variable.
...
The libs shouldn't have any (externally visible) globals anyway.
2011-12-28 21:38:56 +01:00
Uwe Hermann
155d1012f1
sigrok-proto.h: Drop obsolete prototype, move other one.
2011-12-28 21:37:37 +01:00
Uwe Hermann
08d4cc1d14
device: Make some parameters const.
2011-12-28 21:34:37 +01:00
Uwe Hermann
0e3b143994
device: Change some functions to return int.
...
The callers of these functions are yet to be changed so that they
actually check the return values and handle errors appropriately.
2011-12-28 17:26:19 +01:00
Uwe Hermann
94799bc4dc
device: Add Doxygen comments, improve error handling.
...
- Add Doxygen comments for all functions (some TODOs remain).
- Check return code of more functions, handle invalid input.
2011-12-28 16:55:24 +01:00
Bert Vermeulen
cb1e389c72
make time/duration work, at least when loading from a session file
...
PD decode() call now takes 3 arguments: timeoffset, duration, data
as per the current API specification.
2011-12-28 12:17:13 +01:00
Uwe Hermann
15278f3e9c
datastore.c: Improve error handling and docs.
...
- Add Doxygen comments for all functions (some TODOs remain).
- Check for invalid input parameters (such as NULL pointers etc).
- Return SR_ERR_ARG upon invalid input parameters.
- Make sr_datastore_put() return int instead of void, so we can pass
an error code (SR_OK, SR_ERR_MALLOC, and so on) to the caller.
2011-12-26 21:26:02 +01:00
Uwe Hermann
7a6ec0c376
sr_filter_probes(): Check for too many probes.
...
Return SR_ERR_ARG if the number of enabled probes is higher than the
requested unit size supports.
2011-12-26 21:26:01 +01:00
Uwe Hermann
488a13b110
Improve sr_filter_probes error handling and docs.
...
- Much more elaborate doxygen comments for the function and its
parameters, allowed input values, and so on.
- Make 'probelist' const, the function doesn't modify it.
- Check for invalid inputs such as NULL pointers.
- Use g_try_malloc() and g_free() for the output buffer. Document who
is expected to g_free() the buffer.
2011-12-22 14:16:07 +01:00
Uwe Hermann
25a605d187
libsigrok: Quickfix for a segfault in ChronoVu LA8.
2011-12-04 18:33:29 +01:00
Gareth McMullin
276585ff20
srd: Pass samplerate to decoder in metadata.
2011-11-28 21:52:35 +13:00
Bert Vermeulen
f64c14141b
fix CLI size string specification
...
accept "hz" as optional qualifier but nothing else
properly return an error instead of quietly returning zero size
2011-11-27 19:33:07 +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
Uwe Hermann
e48846b1d2
libsigrok: glib-2.0 is a hard requirement.
2011-11-19 16:23:21 +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
Gareth McMullin
805e9640ff
Fixed a crash when loading a second session file.
2011-11-17 21:18:46 +13:00
Uwe Hermann
48ca6b54b0
sigrok.h: Remove SIGROK_*VERSION #defines again.
...
These version numbers represent the sigrok version (i.e., the version
of the tarball, such as "sigrok-0.2.0.tar.gz"), but _not_ the libsigrok
(libtool) library/API/ABI versions. Thus, they should not be in
libsigrok's include file (sigrok.h).
2011-11-15 22:54:07 +01:00
Uwe Hermann
719c5a934c
Fix some compiler warnings.
2011-11-15 21:05:40 +01:00
Uwe Hermann
300007323e
libsigrok.pc: Add Required.private field entries.
...
The "Required.private:" field in pkg-config .pc files is used for
declaring that we need the listed libs (pkg-config packages) for
static linking, but not for dynamic linking.
I.e., the "Required.private:" field should be used for libs which we
use internally in libsigrok, but which we do not "expose" ourselves.
For now all libs are listed as "Required.private:" instead of
"Required:", but this may not be entirely correct and needs to be
checked carefully at some later date.
2011-11-15 01:16:38 +01:00
Gareth McMullin
5c582d9f61
Remove IO source if callback returns FALSE.
2011-11-06 11:44:25 +13:00
Uwe Hermann
52f28f821f
sigrok.h: Add SIGROK_{MAJOR,MINOR,MICRO,}_VERSION #defines.
2011-10-31 14:49:12 +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
7d2afd6c95
better session bus logging
2011-06-20 11:42:43 +02:00
Bert Vermeulen
9c939c5132
use new datafeed packet format
2011-06-19 14:28:50 +02:00
Bert Vermeulen
38ab3ee79d
new datafeed packet format
...
struct sr_datafeed_packet now has timeoffset and duration fields,
expressed in picoseconds (1/10^12 seconds)
length and unitsize are now in a separate struct sr_datafeed_logic
2011-06-19 02:35:23 +02:00
Bert Vermeulen
60eb1eb582
fix parameter type
2011-06-19 00:55:36 +02:00
Bert Vermeulen
8e49cebd10
whitespace
2011-06-12 18:07:15 +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
06dd80d424
Add sr_spew/SR_LOG_SPEW for even more debug output.
...
This is meant for really extensive debug output which can slow down
operation significantly and should thus only be enabled if really needed.
2011-05-09 01:03:21 +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