Commit Graph

784 Commits

Author SHA1 Message Date
Bert Vermeulen 4ca3898445 zeroplus-logic-cube: use new scan API 2012-08-03 10:27:38 +02:00
Bert Vermeulen 39cfdd75f9 hantek-dso: use new scan API 2012-08-03 10:27:38 +02:00
Bert Vermeulen 0448d11097 asix-sigma: use new scan API + fixes
Now freeing FTDI context and driver-private context.
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 f8c617cf4c hantek-dso: instance list fix 2012-08-03 10:27:38 +02:00
Bert Vermeulen 10e5cbede8 ols: use new scan API 2012-08-03 10:27:38 +02:00
Bert Vermeulen ed300b9f6a asix-sigma: use driver struct-based device instance list 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 dcf03d6dbd demo: use driver struct-based device instance list 2012-08-03 10:27:38 +02:00
Bert Vermeulen 3275654708 zeroplus-logic-cube: use driver struct-based device instance list 2012-08-03 10:27:38 +02:00
Bert Vermeulen 982947f7a2 hantek-dso: use driver struct-based device instance list 2012-08-03 10:27:38 +02:00
Bert Vermeulen e5e81856b4 ols: use driver struct-based device instance list 2012-08-03 10:27:38 +02:00
Bert Vermeulen d6db79a48c genericdmm: device scan fixes 2012-08-03 10:27:38 +02:00
Bert Vermeulen f1a14ea7ab genericdmm: don't use deprecated hwcap_get_all() driver API call 2012-08-03 10:27:37 +02:00
Bert Vermeulen 6910bf6bf6 genericdmm: use new driver info_get() API call 2012-08-03 10:27:37 +02:00
Bert Vermeulen a27999e657 fx2lafw: don't use deprecated hwcap_get_all() driver API call 2012-08-03 10:27:37 +02:00
Bert Vermeulen c5e82ca5e3 fx2lafw: device scan fixes 2012-08-03 10:27:37 +02:00
Bert Vermeulen f69b47f0f8 fx2lafw: a device scan always invalidates any previous scans 2012-08-03 10:27:37 +02:00
Bert Vermeulen 6e9339aae2 fx2lafw: use new driver info_get() API call 2012-08-03 10:27:37 +02:00
Bert Vermeulen be34a1c746 sr: deprecate driver API call hwcap_get_all()
This is now handled with a call to info_get(SR_DI_HWCAPS). This brings
it in line with the new driver opts: info_get(SR_DI_HWOPTS).
2012-08-03 10:27:37 +02:00
Bert Vermeulen df12380181 sr: new sr_info_get() API call, wrapper for driver info_get()
This will replace sr_dev_info_get(), the wrapper for driver dev_info_get()
2012-08-03 10:27:37 +02:00
Bert Vermeulen f92f4eab23 sr: add new driver API call info_get()
This will replace dev_info_get(), and will be used to fetch both
driver and device instance-specific information. The sr_dev_inst
argument is NULL in case of a driver info fetch. In line with the
libsigrok wrapper, this function returns an error code, using the
supplied void ** to return the requested data.
2012-08-03 10:27:37 +02:00
Bert Vermeulen 9e41fdba40 sr: add driver field to sr_dev_inst, to bring it on a par with sr_dev. 2012-08-03 10:27:37 +02:00
Bert Vermeulen 8bfdc8c4a5 sr: split driver options into separate list 2012-08-03 10:27:37 +02:00
Bert Vermeulen 3a0fe4023d genericdmm: use new scan API 2012-08-03 10:27:37 +02:00
Bert Vermeulen bbb40871c8 genericdmm: more flexible device discovery 2012-08-03 10:27:37 +02:00
Bert Vermeulen 75337758d8 genericdmm: use driver struct-based device instance list 2012-08-03 10:27:37 +02:00
Bert Vermeulen a8cc8e44b9 fx2lafw: use driver struct-based device instance list 2012-08-03 10:27:37 +02:00
Bert Vermeulen 06717a8a60 fx2lafw: use new instance-based probe list 2012-08-03 10:27:37 +02:00
Bert Vermeulen 3a7a22cb07 fx2lafw: use new init/scan API 2012-08-03 10:27:37 +02:00
Bert Vermeulen dd34b8d3c4 sr: add GSList of instances to the driver struct
This gives the driver a private place to keep its instances, without
polluting the global namespace.
2012-08-03 10:27:37 +02:00
Bert Vermeulen 47211d65b4 sr: add probe list to device instance
There is no point in libsigrok copying probe lists around. The driver now
builds a list of probes according to the model device it found, and will
make that available to a frontend. The frontend thus has a reference of
what the driver has, including default names, and doesn't need libsigrok
to provide an unnecessary level of abstraction.

The sr_probe_new() library-private function is a helper for drivers.
2012-08-03 10:27:37 +02:00
Bert Vermeulen 80bf042635 sr: split driver init into init() and scan()
init() now only does whatever administrative stuff it needs (typically not
much), and returns an error code.

scan() can be called multiple times during the life of an application, and
returns a GSList of struct sr_dev_inst * of devices found during that scan.
The instances are a copy of the ones stored in the driver's own instance
list, to be freed by the caller with g_slist_free() only.

The scan() call can be passed a GSList of struct sr_hwopt *, to direct the
scanning.
2012-08-03 10:27:37 +02:00
Bert Vermeulen b159add3d9 sr: move SR_HWOPT into its own enum, and create struct sr_hwopt
SR_HWOPT_* entries are driver options, not device instance parameters, so
they will never be mixed together.

Also, driver options are always passed in a GSList, where the data field
is a struct sr_hwopt.
2012-08-03 10:27:37 +02:00
Bert Vermeulen 633b2fac75 genericdmm: better subdriver API arguments 2012-08-03 10:27:37 +02:00
Bert Vermeulen 1ef445b3d6 genericdmm/fs9922: no initialization needed 2012-08-03 10:27:36 +02:00
Bert Vermeulen 7fc754a0db genericdmm: allow for default options in DMM profiles
Much better than the special-cased USB vid.pid
2012-08-03 10:27:36 +02:00
Bert Vermeulen 7356a55db8 genericdmm: use vid.pid as USB conn spec
: is just too hard for the CLI
2012-08-03 10:27:36 +02:00
Bert Vermeulen db1352007d genericdmm: fix header guard 2012-08-03 10:27:36 +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
Ivan Fedorov 0d012ede9d sr: fix gnuplot script for USBee DX and clones
- Now channels order is right
 - Added 16bit version
2012-08-03 00:25:38 +02:00
Ivan Fedorov 0e8d0e24d0 sr: fx2lafw: Add 16bit support for USBee DX and clones
gnuplot script support only 8 channels
2012-08-03 00:25:37 +02:00
Ivan Fedorov c19298d141 sr: add gnuplot script for USBee DX and clones 2012-08-01 00:12:00 +04:00
Ivan Fedorov c9166745f2 sr: fx2lafw: Add basic support for USBee DX and clones 2012-08-01 00:12:00 +04:00
Bert Vermeulen 0d1297a291 sr: always use uint64_t for samplerate 2012-07-29 02:45:40 +02:00
Bert Vermeulen b04781bb2b sr: extra checks for properly handling driverless devices 2012-07-29 02:16:17 +02:00
Bert Vermeulen 3dafb92bde sr: fix struct sr_input for parameter passing 2012-07-29 02:16:17 +02:00
Tomaž Šolc c506a6a688 Allow setting samplerate when reading binary files
I had a binary file that I needed to decode using UART decoder. UART
decoder needs to know the sample rate for the data, but currently it's
not possible to pass parameters to input formats and so the "binary"
file format always sets the samplerate to 0.

This patch adds the possibility to append a colon-separated list of
key=value options to the -I argument, in the same way -d supports it.
Also, it makes the "binary" format support the "samplerate" option.

I included the GHashTable containing input format options directly in
the sr_input struct. I'm not sure if that's the right way to do it. I
saw that -d uses a much more elaborate system with device capabilities
and typed options, but that seemed like an overkill for input formats.
2012-07-29 02:16:17 +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