Bert Vermeulen
1644fb2473
chronovu-la8: use driver-private storage for instances
2012-08-03 11:29:00 +02:00
Bert Vermeulen
6f57fd9694
sr: remove obsolete SR_DI_INST
2012-08-03 11:29:00 +02:00
Bert Vermeulen
87ca93c504
sr/drivers: add proper probe list to instances of all drivers
2012-08-03 11:29:00 +02:00
Bert Vermeulen
b35c829306
sr/drivers: fix off-by-one if frontend-initiated probe configuration
2012-08-03 11:29:00 +02:00
Bert Vermeulen
9e90dcba9c
sr/drivers: remove driver API call dev_status_get()
...
It's obsolete: no frontend ever used it, and neither did libsigrok.
The sdi->status field is only used internally by some drivers, and
should probably be moved to the driver-specific context structs.
2012-08-03 11:27:31 +02:00
Bert Vermeulen
3ffb6964a1
sr/drivers: change driver dev_acquisition_start/_stop calls to use sdi
2012-08-03 11:27:31 +02:00
Bert Vermeulen
25a0f108f4
sr/drivers: change driver dev_open/dev_close calls to use sdi
2012-08-03 11:27:31 +02:00
Bert Vermeulen
6f4b1868e8
sr/drivers: use sr_dev_inst instead of device index for dev_config_set()
...
All driver API calls using device index as a parameter will instead use a
const struct sr_dev_inst.
2012-08-03 10:27:39 +02:00
Bert Vermeulen
9c4311c524
chronovu-la8: adjust to multi-vid/pid patch
2012-08-03 10:27:39 +02:00
Bert Vermeulen
7566601c21
chronovu-la8: don't use deprecated hwcap_get_all() driver API call
2012-08-03 10:27:39 +02:00
Bert Vermeulen
cfe8a84dd7
chronovu-la8: scan/info_get fixes
2012-08-03 10:27:39 +02:00
Bert Vermeulen
6a2761fd99
chronovu-la8: use new driver info_get() API call
2012-08-03 10:27:38 +02:00
Bert Vermeulen
c4f3ed4bb0
chronovu-la8: use new scan API + fixes
...
Now freeing FTDI context and driver-private context.
2012-08-03 10:27:38 +02:00
Bert Vermeulen
765ef2f725
chronovu-la8: use driver struct-based device instance list
2012-08-03 10:27:38 +02:00
Bert Vermeulen
61136ea603
sr: add new driver API call: scan()
...
This changes the semantics of the init() call as well. That now only
initializes the driver -- an administrative affair, no hardware gets
touched during this call. It returns a standard SR_OK or SR_ERR* code.
The scan() call does a discovery run for devices it knows, and returns
the number found. It can be called at any time.
2012-08-03 10:27:36 +02:00
Bert Vermeulen
40dda2c3a5
sr: remove unused argument from hardware driver function init()
...
It was actually used in one way: the session file loaded abused it for
passing in the filename -- something it definitely wasn't intended for.
This now uses the proper way to pass arguments to a driver: the new
SR_HWCAP_SESSIONFILE.
The OLS driver could also use it as an indication of the serial port to
use instead of actively probing all serial ports on the system, but there
wasn't any frontend code that passed in such a parameter, making it
entirely useless. That will soon be handled differently with the new
scan() API call, regardless.
2012-08-03 10:27:36 +02:00
Bert Vermeulen
d67b663e21
sr: chronovu-la8: fix segfault on discovery
...
If the uninitialized value didn't happen to contain 0, and there
is no Chronovu LA8 connected, the la8_close() causes a segfault
in libftdi.
2012-07-24 00:53:01 +02:00
Uwe Hermann
74e5f12d3d
sr: la8: Support for newer USB VID/PID of the device.
...
Thanks to Jerry Jacobs for the patch!
2012-07-15 00:34:27 +02:00
Uwe Hermann
43be303c84
sr: la8: Drop useless cast.
2012-07-12 23:23:13 +02:00
Bert Vermeulen
45c59c8bdd
sr: moved sigrok.h so libsigrok/libsigrok.h
...
All frontends will have to include <libsigrok/libsigrok.h> from now on.
This header includes proto.h and version.h, both installed from the
distribution into $INCLUDE/libsigrok/ as well.
The only dynamically changed header is now version.h, which has both
libsigrok and libtool compile-time versions in it.
2012-07-05 01:17:28 +02:00
Uwe Hermann
b908f067f2
sr: chronovu-la8: Split code into api.c and driver.c.
...
We should generally use api.c for API related functions and put the other
functions (mostly hardware-specific low-level code) into other C file(s)
for better readability.
2012-06-21 23:34:38 +02:00
Joel Holdsworth
a533743dd1
sr: Made sample rate lists const
2012-05-31 19:51:11 +01:00
Joel Holdsworth
1b79df2f57
sr: Made the dev_config_set parameter a const pointer
2012-05-31 19:51:11 +01:00
Joel Holdsworth
b7f578bef5
sr: Made the dev_info_get return value const
2012-05-31 19:51:10 +01:00
Joel Holdsworth
915f7cc87a
sr: Made hwcap const
2012-05-31 19:51:09 +01:00
Bert Vermeulen
f366e86c68
sr: change all drivers to use SR_DF_META_LOGIC
2012-05-30 23:55:36 +02:00
Uwe Hermann
0abee5076f
sr: Fix some TODOs, improve comments/docs.
2012-03-04 15:10:12 +01:00
Uwe Hermann
3cd3a20b35
sr: More callback param renames.
...
Start/stop acquisition callbacks: Consistently name the 'void *' parameter
cb_data for now. The per-device-instance device pointer is called
'session_dev_id' everywhere for now, but this should be renamed to
something more clear.
2012-03-04 15:10:09 +01:00
Uwe Hermann
1f9813eb6c
sr: Name all callback data 'cb_data'.
2012-03-02 02:25:42 +01:00
Uwe Hermann
31ccebc492
sr: s/sr_session_bus/sr_session_send/.
2012-03-01 23:49:25 +01:00
Uwe Hermann
c09f0b578c
sr/cli/gtk/qt/: s/plugin/driver/.
2012-02-28 23:52:30 +01:00
Uwe Hermann
d261dbbfcc
sr: Fix/document probe names.
2012-02-28 01:09:29 +01:00
Uwe Hermann
04254c3f83
sr: la8: Improve comments and messages a bit.
2012-02-23 22:16:16 +01:00
Uwe Hermann
47671b0f26
sr: la8: Remove some unneeded checks.
2012-02-23 00:27:12 +01:00
Uwe Hermann
ea9cfed7a5
sr: Consistent ctx name for per-dev-inst context.
2012-02-18 18:07:42 +01:00
Uwe Hermann
a9a245b428
sr: s/config_set/dev_config_set/.
...
This functions is per-device-instance, so use dev_ as prefix as with
the other ones.
2012-02-18 12:11:15 +01:00
Uwe Hermann
69040b7c8f
sr: s/acquisition_*/dev_acquisition_*/.
...
These functions are per-device-instance, so use dev_ as prefix as with
the other ones.
2012-02-18 12:03:49 +01:00
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
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