fix multiple calls to gpio_get_value() after switching to the cached file pointer -- need to seek to the start of the stream after every read

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1832 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 14 years ago
parent 395531cc37
commit b39e2ae6be

@ -1,3 +1,9 @@
2010-08-24 Mike Frysinger <vapier@gentoo.org>
* src/tap/cable/gpio.c (gpio_get_value): Need to seek back to the start of
the gpio file after reading the value so we keep getting up-to-date
results as reported by Frans Meulenbroeks.
2010-08-19 Mike Frysinger <vapier@gentoo.org>
* configure.ac, src/tap/cable_list.h, src/tap/cable/generic_usbconn_list.h,

@ -133,6 +133,7 @@ static int gpio_get_value (FILE *fp, unsigned int gpio)
int value;
ret = fscanf (fp, "%i", &value);
rewind (fp);
if (ret != 1)
{

Loading…
Cancel
Save