git://developer.intra2net.com
/
libftdi
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
7828006
)
examples/eeprom.c: use AUTO_DETACH_REATACH_SIO_MODULE
author
Yegor Yefremov
<yegorslists@googlemail.com>
Thu, 31 Aug 2023 07:07:51 +0000 (09:07 +0200)
committer
Thomas Jarosch
<thomas.jarosch@intra2net.com>
Fri, 1 Sep 2023 16:09:36 +0000 (18:09 +0200)
This way, the device's state remains unchanged after the
eeprom invocation.
Bonus: remove trailing white spaces.
examples/eeprom.c
patch
|
blob
|
blame
|
history
diff --git
a/examples/eeprom.c
b/examples/eeprom.c
index
45f5dff
..
3d03ac3
100644
(file)
--- a/
examples/eeprom.c
+++ b/
examples/eeprom.c
@@
-90,6
+90,8
@@
int main(int argc, char **argv)
return EXIT_FAILURE;
}
+ ftdi->module_detach_mode = AUTO_DETACH_REATACH_SIO_MODULE;
+
while ((i = getopt(argc, argv, "d::ev:p:l:P:S:w")) != -1)
{
switch (i)
@@
-200,7
+202,7
@@
int main(int argc, char **argv)
fprintf(stderr, "\n");
fprintf(stderr, "unable to open ftdi device: %d (%s)\n",
f, ftdi_get_error_string(ftdi));
-
+
retval = -1;
goto done;
}