Commit Graph

44 Commits

Author SHA1 Message Date
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 0a7da5f8c9 fx2lafw: Keep track of our own libusb fds 2013-04-30 09:55:44 +02:00
Uwe Hermann 50985c2019 GPL headers: Use correct project name. 2013-04-23 22:24:30 +02:00
Bert Vermeulen 250a78c7d5 fx2lafw: Use standard dev_clear() instead 2013-04-16 17:57:08 +02:00
Bert Vermeulen 13d8e03c4f Bump copyright year 2013-04-11 18:32:06 +02:00
Uwe Hermann 3e9b7f9c77 Rename session_dev_id to cb_data everywhere.
We use 'cb_data' in all drivers these days, make the few remaining ones
that use 'session_dev_id' consistent.
2013-02-07 11:26:02 +01:00
Bert Vermeulen c50277a6ec Deprecate SR_DI_TRIGGER_TYPES.
This is replaced by SR_CONF_TRIGGER_TYPE.
2013-01-25 11:52:27 +01:00
Uwe Hermann b99457f09c fx2lafw: Various cosmetics, typo fixes, etc. 2012-12-18 01:26:58 +01:00
Alexandru Gagniuc f427daefb0 fx2lafw: Use DRIVER_LOG_DOMAIN for log messages
Use the new DRIVER_LOG_DOMAIN mechanism, where explicitly writing
the driver name in the message string is no longer required.

Thus:

- sr_err("fx2lafw: Something bad happened.");

becomes:

+ sr_err("Something bad happened.");

In either case, the log output is the same.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2012-12-17 12:26:10 -06:00
Bert Vermeulen e9022f596d sr: make struct drv_context global 2012-09-11 21:27:26 +02:00
Bert Vermeulen f5cfe894ec fx2lafw: use default libusb context 2012-09-11 21:20:50 +02:00
Bert Vermeulen dc9dbe949a fx2lafw: use driver-private storage for instances and libusb_context 2012-08-03 11:29:00 +02:00
Lars-Peter Clausen 0caa1ef0cb sr: fx2lafw: Abort pending transfers when sampling is stopped
The recent reworks of the fx2lafw made sure that the total buffer size is large
enough hold 500ms of data. This was done to improve performance and stability.
That the timeout value for a transfer was also increased to over 500ms, a side
effect of this is that when sampling is stopped there will be a additional delay
of 500ms. This is because the driver waits for all transfers to be freed
before it sends a SR_DF_END packet. Once sampling has stopped this will only
happen once a transfer times out. This patch cancels all pending transfers when
sampling is stopped, this will cause them to be freed almost immediately and the
additional delay will disappear.

Also make sure, that if we know, that we just have received the last transfer to
not resubmit this transfer again.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2012-07-04 01:11:50 +02:00
Lars-Peter Clausen 2769eed991 sr: fx2lafw: Move empty_transfer_count to device ctx
If one device is failing it should not affect the transfers of other devices.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2012-06-28 00:40:52 +02:00
Uwe Hermann 0a88ec3d9c sr: fx2lafw: Use gboolean, cosmetics, fix gcc warning. 2012-05-31 22:48:40 +02:00
Joel Holdsworth f4575b6549 fx2lafw: Added a check to limit the sample rate during 16-bit sampling 2012-05-31 19:53:36 +01:00
Joel Holdsworth d1ddc7a9a8 fx2lafw: Added device caps and added support for wide sampling 2012-05-31 19:52:32 +01:00
Uwe Hermann 7e41e319d9 sr: fx2lafw: Forgot to add (C) line to fx2lafw.h in recent commit. 2012-05-30 23:31:03 +02:00
Uwe Hermann 0a8c0c324e sr: fx2lafw: Only check for correct major FW version.
Changes in the minor version number are OK, as those should never
contain any incompatible/API changes.
2012-05-30 23:23:14 +02:00
Uwe Hermann 921634ec10 sr: Fix typos. 2012-05-30 22:42:47 +02:00
Uwe Hermann f60fdf6ebe sr: fx2lafw: s/MAX_RENUM_DELAY/MAX_RENUM_DELAY_MS/. 2012-05-30 09:30:50 +02:00
Uwe Hermann e8bd58ffd2 sr: fx2lafw: Fix a firmware upload bug on 32bit systems.
The glib GTimeVal data type (and some functions using it) will be faded
out from glib sooner or later, so it's not a good idea to use them anyway.

In this specific case GTimeVal.tv_sec was overflowing, leading a check in
libsigrok to fail, and thus to FX2 firmware upload errors, i.e.
non-working fx2lafw devices.

  http://thread.gmane.org/gmane.comp.debugging.sigrok.devel/166

The root cause is that GTimeVal.tv_sec is a 'glong' (8 bytes on 64bit
systems, but only 4 on 32bit systems).

We now use an int64_t (and g_get_monotonic_time() instead of the more
problematics g_get_current_time() which uses a GTimeVal).

This has been verified to fix the issue on a 32bit system.

Other uses of GTimeVal in libsigrok will be removed in a later release.

Also, drop unneeded GTV_TO_MSEC.
2012-05-30 09:30:18 +02:00
Uwe Hermann 37dc0b16a6 fx2lafw: Cosmetics. 2012-05-11 00:22:30 +02:00
Joel Holdsworth 897c1a2ee5 fx2lafw: Added support for 100kHz and 50kHz sampling 2012-05-10 13:08:09 +01:00
Joel Holdsworth 13bf7eccbb fx2lafw: Added command to verify firmware version 2012-04-10 18:27:24 +01:00
Joel Holdsworth cb61e9f7c3 fx2lafw: Only terminate session after all transfers have been aborted 2012-03-24 10:09:28 +00:00
Joel Holdsworth 6c6781b6a7 fx2lafw: Imported software triggering from fx2lafw 2012-03-21 22:47:25 +00:00
Joel Holdsworth ecc16ed070 fx2lafw: Upped NUM_SIMUL_TRANSFERS to 32 2012-03-14 22:56:15 +00:00
Joel Holdsworth f8b07fc6c3 fx2lafw: Moved firmware path into fx2lafw_profile 2012-03-12 21:41:28 +00:00
Joel Holdsworth 4679d14db3 fx2lafw: Made fx2lafw profiles const 2012-03-12 21:41:27 +00:00
Joel Holdsworth 6ccfadaf66 fx2lafw: Made string pointers constant 2012-03-12 21:39:02 +00:00
Joel Holdsworth 2e526f4a6a fx2lafw: Moved num_samples into context struct 2012-03-07 07:52:05 +00:00
Joel Holdsworth 74fcfb806d fx2lafw: Devices now retain the same PID/VID after fw load 2012-03-07 07:51:39 +00:00
Joel Holdsworth e318664793 fx2lafw: Implemented SR_HWCAP_PROBECONFIG and SR_HWCAP_LIMIT_SAMPLES 2012-03-07 07:51:39 +00: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 6c39d99a28 sr: fx2lafw: Consistent #include guard naming. 2012-02-27 23:55:06 +01:00
Uwe Hermann 772a0e6153 fx2lafw: Small consistency fixes. 2012-02-27 23:40:38 +01:00
Joel Holdsworth 610dbb7091 fx2lafw: Implemented hw_dev_acquisition_start 2012-02-27 21:58:25 +00:00
Joel Holdsworth 7cb621d418 fx2lafw: Basic implementation of hw_dev_config_set with SR_HWCAP_LIMIT_SAMPLES 2012-02-27 21:58:25 +00:00
Joel Holdsworth 43125c6993 fx2lafw: Implemented hw_dev_open 2012-02-27 21:58:25 +00:00
Joel Holdsworth b1eeb67e92 fx2lafw: Implemented firmware upload 2012-02-27 21:58:25 +00:00
Joel Holdsworth 8b35f47483 fx2lafw: Exposed capabilities data 2012-02-25 11:11:44 +00:00
Joel Holdsworth 187b358232 fx2lafw: Added probing for fx2lafw devices 2012-02-25 11:11:29 +00:00
Joel Holdsworth f302a08256 fx2lafw: Added empty hardware module for fx2lafw 2012-02-25 09:11:53 +00:00