libftdi-git Archives

Subject: A library to talk to FTDI chips branch, master, updated. v1.5-26-g9c0949f

From: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
To: libftdi-git@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 29 Aug 2023 17:14:16 +0200 (CEST)
The branch, master has been updated
       via  9c0949fff4d2e6dfdf6701fc481b46a337a051d8 (commit)
      from  4de44fefc63f112f5c804c191da101cd8252978f (commit)


- Log -----------------------------------------------------------------
commit 9c0949fff4d2e6dfdf6701fc481b46a337a051d8
Author: Matthias Klein <matthias@xxxxxxxxxxxxx>
Date:   Fri Nov 18 09:59:40 2022 +0100

    ftdi_readstream: fix timeout setting
    
    Divide the whole seconds into tv_sec, and the remaining microseconds into 
tv_usec.
    
    Signed-off-by: Matthias Klein <matthias@xxxxxxxxxxxxx>

-----------------------------------------------------------------------

Summary of changes:
 src/ftdi_stream.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/ftdi_stream.c b/src/ftdi_stream.c
index f5f1287..4229d94 100644
--- a/src/ftdi_stream.c
+++ b/src/ftdi_stream.c
@@ -241,7 +241,8 @@ ftdi_readstream(struct ftdi_context *ftdi,
     {
         FTDIProgressInfo  *progress = &state.progress;
         const double progressInterval = 1.0;
-        struct timeval timeout = { 0, ftdi->usb_read_timeout * 1000};
+        struct timeval timeout = { ftdi->usb_read_timeout / 1000,
+            (ftdi->usb_read_timeout % 1000) * 1000 };
         struct timeval now;
 
         int err = libusb_handle_events_timeout(ftdi->usb_ctx, &timeout);


hooks/post-receive
-- 
A library to talk to FTDI chips

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

Current Thread
  • A library to talk to FTDI chips branch, master, updated. v1.5-26-g9c0949f, libftdi-git <=