X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fnorma-dmm%2Fapi.c;h=6dc9ed87da25ffe21b512ff36a16ad8edff78f6f;hb=b11afbb142a9ddc3fd2c99f3d3be39683cdec4ac;hp=2626de6a6dd3211d4a347513dae07e985eaa827c;hpb=c442ffda0fc6fa9bc3c5397a21ef1d04f01a64a1;p=libsigrok.git diff --git a/src/hardware/norma-dmm/api.c b/src/hardware/norma-dmm/api.c index 2626de6a..6dc9ed87 100644 --- a/src/hardware/norma-dmm/api.c +++ b/src/hardware/norma-dmm/api.c @@ -22,6 +22,7 @@ * @internal */ +#include #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; }