]> sigrok.org Git - libsigrok.git/commitdiff
mic-985xx: Fix blocking serial write timeout.
authorUwe Hermann <redacted>
Sun, 13 Sep 2015 21:47:16 +0000 (23:47 +0200)
committerUwe Hermann <redacted>
Sun, 13 Sep 2015 21:47:16 +0000 (23:47 +0200)
This fixes bug #433.

src/hardware/mic-985xx/protocol.c

index 9e3d9863b3bbc1aa16392c920e8c6b68a041e448..d7c69d0e315c9e49ae6e85fcc736e34886941a26 100644 (file)
@@ -25,7 +25,8 @@ static int mic_send(struct sr_serial_dev_inst *serial, const char *cmd)
 {
        int ret;
 
-       if ((ret = serial_write_blocking(serial, cmd, strlen(cmd), 0)) < 0) {
+       if ((ret = serial_write_blocking(serial, cmd, strlen(cmd),
+                       serial_timeout(serial, strlen(cmd)))) < 0) {
                sr_err("Error sending '%s' command: %d.", cmd, ret);
                return SR_ERR;
        }