parent
936b1c00e8
commit
d545c81c96
|
@ -120,7 +120,8 @@ static GSList *scan(struct sr_dev_driver *drv, GSList *options)
|
||||||
nmadmm_requests[NMADMM_REQ_IDN].req_str);
|
nmadmm_requests[NMADMM_REQ_IDN].req_str);
|
||||||
g_usleep(150 * 1000); /* Wait a little to allow serial port to settle. */
|
g_usleep(150 * 1000); /* Wait a little to allow serial port to settle. */
|
||||||
for (cnt = 0; cnt < 7; cnt++) {
|
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.");
|
sr_err("Unable to send identification request.");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,8 @@ static int nma_send_req(const struct sr_dev_inst *sdi, int req, char *params)
|
||||||
devc->last_req = req;
|
devc->last_req = req;
|
||||||
devc->last_req_pending = TRUE;
|
devc->last_req_pending = TRUE;
|
||||||
|
|
||||||
if (serial_write_blocking(serial, buf, len, 0) < 0) {
|
if (serial_write_blocking(serial, buf, len,
|
||||||
|
serial_timeout(serial, len)) < 0) {
|
||||||
sr_err("Unable to send request.");
|
sr_err("Unable to send request.");
|
||||||
devc->last_req_pending = FALSE;
|
devc->last_req_pending = FALSE;
|
||||||
return SR_ERR;
|
return SR_ERR;
|
||||||
|
|
Loading…
Reference in New Issue