Commit Graph

59 Commits

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