X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fnorma-dmm%2Fapi.c;h=5dacde2ea4a4d24119dde53813eeeefa98d62319;hb=b5bbc3f1b00d5f3096c6800af4069fb07704d3a9;hp=e0397c01d2c4eb416bd46f76763917edceb73685;hpb=49c06128d777a4d422a96e713b1490fa7a708da4;p=libsigrok.git diff --git a/hardware/norma-dmm/api.c b/hardware/norma-dmm/api.c index e0397c01..5dacde2e 100644 --- a/hardware/norma-dmm/api.c +++ b/hardware/norma-dmm/api.c @@ -17,6 +17,11 @@ * along with this program. If not, see . */ +/** @file + * Norma DM9x0/Siemens B102x DMMs driver. + * @internal + */ + #include "protocol.h" static const int32_t hwopts[] = { @@ -122,6 +127,7 @@ static GSList *do_scan(struct sr_dev_driver* drv, GSList *options) snprintf(req, sizeof(req), "%s\r\n", 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(serial, req, strlen(req)) == -1) { sr_err("Unable to send identification request: %d %s.", @@ -129,7 +135,7 @@ static GSList *do_scan(struct sr_dev_driver* drv, GSList *options) return NULL; } len = BUF_MAX; - serial_readline(serial, &buf, &len, 1500); + serial_readline(serial, &buf, &len, NMADMM_TIMEOUT_MS); if (!len) continue; buf[BUF_MAX - 1] = '\0';