Uwe Hermann
a147c7b416
hantek-dso: config_list(): Only SR_CONF_BUFFERSIZE needs sdi.
2013-11-22 22:31:24 +01:00
Martin Ling
8f996b8948
probe_groups: API changes required to implement probe groups.
2013-11-08 01:03:16 +01:00
Uwe Hermann
3b412e3a30
s/clear_instances/dev_clear/.
...
Consistently use the same name for the dev_clear() API callback
everywhere.
2013-06-02 16:56:41 +02:00
Uwe Hermann
f6beaac55c
std: Drop hw_ from function names.
...
The per-driver API calls no longer have a hw_ prefix (e.g. hw_init()
became init() and so on), so drop the 'hw_' from the std versions
for those API callbacks too.
2013-06-02 16:46:18 +02:00
Uwe Hermann
dec6c583a2
hantek-dso: Simplify cleanup().
2013-06-02 13:52:40 +02:00
Uwe Hermann
6078d2c996
Use consistent API callback function names.
...
This now matches what the 'new-driver' tool generates.
2013-05-10 20:01:37 +02:00
Uwe Hermann
decfe89d4e
Drop some lines that are no longer needed.
2013-05-10 18:30:32 +02:00
Uwe Hermann
29a27196a1
s/DRIVER_LOG_DOMAIN/LOG_PREFIX/.
...
This is more correct anyway, and also a bit shorter and more readable.
2013-05-03 21:59:32 +02:00
Bert Vermeulen
50c604f50b
Don't automatically clear known instances from USB drivers on scan
...
This invalidates previously returned sr_dev_inst pointers, which a
frontend may be holding. It's the frontend's responsibility to clear
the list of instances a driver keeps track of by calling
sr_dev_clear(driver);
if it wants a completely new scan done.
2013-04-27 18:27:32 +02:00
Bert Vermeulen
e73ffd4238
Enforce open device before config_set()/dev_acquisition_start()
2013-04-24 22:03:50 +02:00
Bert Vermeulen
46a743c1fa
Whitespace fixes
...
Damn editor.
2013-04-24 19:07:46 +02:00
Bert Vermeulen
294dbac724
hantek-dso: Support conn scan parameter
2013-04-24 03:23:23 +02:00
Uwe Hermann
50985c2019
GPL headers: Use correct project name.
2013-04-23 22:24:30 +02:00
Bert Vermeulen
e2033d4917
hantek-dso: Consistently return SR_ERR_ARG if sdi is needed
2013-04-18 22:48:29 +02:00
Bert Vermeulen
624f5b4c1e
hantek-dso: Support config_get(SR_CONF_CONN)
2013-04-18 01:24:42 +02:00
Bert Vermeulen
d0eec1eea1
hantek-dso: Mark connection as USB
2013-04-17 01:08:18 +02:00
Bert Vermeulen
949b3dc091
hantek-dso: Use std_dev_clear()
2013-04-17 00:49:41 +02:00
Bert Vermeulen
c118080b1d
hantek-dso: Store USB connection in sr_dev_inst
2013-04-17 00:49:41 +02:00
Bert Vermeulen
bd6fbf628a
drivers: return SR_ERR_NA on unsupported config key
...
Fixes bug 89.
2013-04-16 11:00:55 +02:00
Bert Vermeulen
7991784841
hantek-dso: Support SR_CONF_NUM_TIMEBASE/SR_CONF_NUM_VDIV
2013-04-11 18:32:08 +02:00
Bert Vermeulen
3973ee26f5
hantek-dso: SR_CONF_TIMEBASE and _VDIVS lists are now an array of tuples
2013-04-11 18:32:08 +02:00
Bert Vermeulen
034accb512
hantek-dso: move buffer sizes to device context
...
There are only two sizes for every device: 10k and the complete
per-channel buffer size. This can be doubled if one channel is disabled.
2013-04-11 18:32:08 +02:00
Bert Vermeulen
d40073113b
hantek-dso: Small debug fix
2013-04-11 18:32:07 +02:00
Bert Vermeulen
86bb3f4a86
hantek-dso: deprecate struct sr_rational
2013-04-11 18:32:07 +02:00
Bert Vermeulen
f627afd65b
hantek-dso: Adjust to GVariant-based sr_config_* functions
2013-04-11 18:32:06 +02:00
Bert Vermeulen
7b78b2f78f
hantek-dso: use per-device firmware filenames
2013-04-02 14:20:29 +02:00
Bert Vermeulen
be6db330f8
hantek-dso: minor fixes
2013-02-10 17:06:56 +01:00
Uwe Hermann
6fab7b8f53
Driver struct cleanups.
...
- Explicitly list .config_get in all drivers for consistency, and set it
to NULL if unused (whether or not a driver implements it is optional).
- List all 'struct sr_dev_driver' entries in the same order in all drivers.
- Move the check whether .config_set/.config_list exist (i.e., are non-NULL)
into sanity_check_all_drivers().
2013-02-07 10:58:35 +01:00
Uwe Hermann
4afdfd4628
Add and use std_session_send_df_header().
...
This is a small helper function which sends the SR_DF_HEADER packet that
drivers usually emit in their hw_dev_acquisition_start() API callback.
It simplifies and shortens the hw_dev_acquisition_start() functions
quite a bit.
It also simplifies the input modules which send an SR_DF_HEADER packet, too.
This patch also automatically removes some unneeded malloc/free in some
drivers for the 'packet' and 'header' structs used for SR_DF_HEADER.
2013-02-07 10:46:28 +01:00
Uwe Hermann
0e94d524c1
Shorten/simplify hw_dev_list() implementations.
2013-02-05 18:27:05 +01:00
Uwe Hermann
063e7aef6d
Factor out common hw_init() driver code.
...
Most drivers do pretty much the same things in their hw_init()
right now, so factor out that code to std_hw_init() in std.c.
2013-01-29 12:56:02 +01:00
Uwe Hermann
4b97c74e0b
sr_driver_scan(): Improve checks.
...
Check the relevant arguments for != NULL before calling the actual
driver-specific function, so that the driver can safely assume those
arguments are non-NULL. This removes the need to duplicate these
checks in every driver.
Also, do some minor whitespace and consistency improvements.
2013-01-29 12:56:02 +01:00
Bert Vermeulen
6a4710fac2
drivers: Trim unused config_get() calls
...
None of the driver config_get/set/list calls are required.
2013-01-25 16:05:48 +01:00
Bert Vermeulen
9a6517d14b
Deprecate SR_DI_HWCAPS.
...
This is replaced by SR_CONF_DEVICE_OPTIONS.
2013-01-25 15:01:49 +01:00
Bert Vermeulen
328bafabd4
Deprecate SR_DI_TRIGGER_SOURCES.
...
This is replaced by SR_CONF_TRIGGER_SOURCE.
2013-01-25 11:25:32 +01:00
Bert Vermeulen
41f5bd09b0
Deprecate SR_DI_TIMEBASES.
...
This is replaced by SR_CONF_TIMEBASE.
2013-01-25 11:22:20 +01:00
Bert Vermeulen
6e1fbcc41b
Deprecate SR_DI_FILTERS.
...
This is replaced by SR_CONF_FILTER.
2013-01-25 11:19:12 +01:00
Bert Vermeulen
e4f2b2adc1
Deprecate SR_DI_VDIVS.
...
This is replaced by SR_CONF_VDIV.
2013-01-25 11:13:49 +01:00
Bert Vermeulen
2a7b113d13
Deprecate SR_DI_COUPLING.
...
This is replaced by SR_CONF_COUPLING.
2013-01-25 11:04:27 +01:00
Bert Vermeulen
6d1ceffa95
Deprecate SR_DI_BUFFERSIZES.
...
This is replaced by SR_CONF_BUFFERSIZE.
2013-01-25 10:58:37 +01:00
Bert Vermeulen
123e131383
Deprecate SR_DI_CUR_SAMPLERATE.
...
This is replaced by SR_CONF_SAMPLERATE.
2013-01-25 03:17:36 +01:00
Bert Vermeulen
a1c743fc51
drivers: implement config_list()
2013-01-25 02:37:26 +01:00
Bert Vermeulen
035a1078fd
drivers: rename and reorganize config get/set
...
The driver API calls info_get() and dev_config_set() have been renamed
to config_get() and config_set(), respectively.
2013-01-24 19:19:09 +01:00
Bert Vermeulen
69e19dd769
Always interleave analog data with all enabled probes.
...
The new "probes" field in sr_datafeed_analog contains a copy
of all enabled struct sr_probe.
2013-01-23 03:40:44 +01:00
Bert Vermeulen
1953564a96
Rename SR_HWOPT_* and SR_HWCAP_* to SR_CONF_*
2013-01-21 23:32:50 +01:00
Bert Vermeulen
1987b8d63e
drivers: use new sr_config struct
...
Sending an SR_DF_META packet at the start of every stream is not
mandatory; the frontend should ask for what it needs, and any extra
information the driver wants to send will come in due time.
2013-01-21 23:32:49 +01:00
Bert Vermeulen
6b8d6f93bb
Get rid of obsolete SR_DI_NUM_PROBES and SR_DI_PROBE_NAMES.
...
Frontends should use the probe list in the device's sr_dev_inst
to get this information.
2013-01-15 17:42:23 +01:00
Uwe Hermann
7869340103
Shorten probe_names[] arrays everywhere.
...
Also, NULL-terminate all of them.
2012-12-26 00:16:07 +01:00
Uwe Hermann
a873c5940c
Consistently use 'di' as variable name.
...
Use 'di' consistently in all drivers as the name for a local, static
pointer to the respective driver's 'struct sr_dev_driver'.
2012-12-18 00:52:39 +01:00
Peter Stuge
d4928d7102
hardware: Call libusb_error_name() in all USB-related error messages
2012-12-05 01:14:44 +01:00