]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/norma-dmm/api.c
Prefer postfix-increment for consistency across the code-base.
[libsigrok.git] / src / hardware / norma-dmm / api.c
index 2626de6a6dd3211d4a347513dae07e985eaa827c..6dc9ed87da25ffe21b512ff36a16ad8edff78f6f 100644 (file)
@@ -22,6 +22,7 @@
  *  @internal
  */
 
+#include <config.h>
 #include "protocol.h"
 
 static const uint32_t scanopts[] = {
@@ -119,7 +120,8 @@ static GSList *scan(struct sr_dev_driver *drv, GSList *options)
                 nmadmm_requests[NMADMM_REQ_IDN].req_str);
        g_usleep(150 * 1000); /* Wait a little to allow serial port to settle. */
        for (cnt = 0; cnt < 7; cnt++) {
-               if (serial_write_blocking(serial, req, strlen(req), 0) < 0) {
+               if (serial_write_blocking(serial, req, strlen(req),
+                               serial_timeout(serial, strlen(req))) < 0) {
                        sr_err("Unable to send identification request.");
                        return NULL;
                }