rigol-ds: Don't run rigol_ds_block_wait() code unless supported.
This commit is contained in:
parent
aff00e4088
commit
4472867a9f
|
@ -261,6 +261,8 @@ static int rigol_ds_block_wait(const struct sr_dev_inst *sdi)
|
||||||
if (!(devc = sdi->priv))
|
if (!(devc = sdi->priv))
|
||||||
return SR_ERR;
|
return SR_ERR;
|
||||||
|
|
||||||
|
if (devc->model->series->protocol >= PROTOCOL_V3) {
|
||||||
|
|
||||||
start = time(NULL);
|
start = time(NULL);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
@ -284,6 +286,7 @@ static int rigol_ds_block_wait(const struct sr_dev_inst *sdi)
|
||||||
if (parse_int(buf + 5, &len) != SR_OK)
|
if (parse_int(buf + 5, &len) != SR_OK)
|
||||||
return SR_ERR;
|
return SR_ERR;
|
||||||
} while (buf[0] == 'R' && len < 1000000);
|
} while (buf[0] == 'R' && len < 1000000);
|
||||||
|
}
|
||||||
|
|
||||||
rigol_ds_set_wait_event(devc, WAIT_NONE);
|
rigol_ds_set_wait_event(devc, WAIT_NONE);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue