Commit Graph

17 Commits

Author SHA1 Message Date
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