From d2c44d28fec89b22cb27e61d402087d229282a2a Mon Sep 17 00:00:00 2001 From: Yegor Yefremov Date: Thu, 31 Aug 2023 09:07:51 +0200 Subject: [PATCH] examples/eeprom.c: use AUTO_DETACH_REATACH_SIO_MODULE This way, the device's state remains unchanged after the eeprom invocation. Bonus: remove trailing white spaces. --- examples/eeprom.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) 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; } -- 1.7.1