libsigrok/hardware/fx2lafw
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
..
Makefile.am fx2lafw: Implemented initial support for start capture 2012-03-07 07:52:05 +00:00
command.c fx2lafw: Cosmetics. 2012-05-11 00:22:30 +02:00
command.h fx2lafw: Added support for 100kHz and 50kHz sampling 2012-05-10 13:08:09 +01:00
fx2lafw.c sr: fx2lafw: Fix a firmware upload bug on 32bit systems. 2012-05-30 09:30:18 +02:00
fx2lafw.h sr: fx2lafw: Fix a firmware upload bug on 32bit systems. 2012-05-30 09:30:18 +02:00