From: Yegor Yefremov <yegorsli...@googlemail.com>

This way, the device's state remains unchanged after the
eeprom invocation.

Bonus: remove trailing white spaces.
---
 examples/eeprom.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/examples/eeprom.c b/examples/eeprom.c
index 45f5dff..3d03ac3 100644
--- 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;
         }
-- 
2.34.1


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscr...@developer.intra2net.com   

Reply via email to