]> sigrok.org Git - libsigrok.git/commitdiff
brymen-dmm: Fix blocking serial write timeout.
authorUwe Hermann <redacted>
Sun, 13 Sep 2015 21:53:55 +0000 (23:53 +0200)
committerUwe Hermann <redacted>
Sun, 13 Sep 2015 21:53:55 +0000 (23:53 +0200)
This fixes bug #427.

src/hardware/brymen-dmm/parser.c

index ad2252baff4168ab59de0e120db68e414c7822db..7341d38108eda06d54209feada8e324a54c7a794 100644 (file)
@@ -79,7 +79,8 @@ static int bm_send_command(uint8_t command, uint8_t arg1, uint8_t arg2,
        /* TODO: How to compute the checksum? Hardware seems to ignore it. */
 
        /* Request reading. */
-       written = serial_write_blocking(serial, &cmdout, sizeof(cmdout), 0);
+       written = serial_write_blocking(serial, &cmdout, sizeof(cmdout),
+                       serial_timeout(serial, sizeof(cmdout)));
        if (written != sizeof(cmdout))
                return SR_ERR;