cli: support --continuous option for continuous sampling
This commit is contained in:
parent
8a839354c1
commit
74b9b43836
|
@ -54,6 +54,7 @@ static int capabilities[] = {
|
||||||
|
|
||||||
/* These are really implemented in the driver, not the hardware. */
|
/* These are really implemented in the driver, not the hardware. */
|
||||||
HWCAP_LIMIT_SAMPLES,
|
HWCAP_LIMIT_SAMPLES,
|
||||||
|
HWCAP_CONTINUOUS,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -654,7 +655,7 @@ void receive_transfer(struct libusb_transfer *transfer)
|
||||||
g_free(cur_buf);
|
g_free(cur_buf);
|
||||||
|
|
||||||
num_samples += cur_buflen;
|
num_samples += cur_buflen;
|
||||||
if ((unsigned int)num_samples > limit_samples) {
|
if (limit_samples && (unsigned int) num_samples > limit_samples) {
|
||||||
hw_stop_acquisition(-1, user_data);
|
hw_stop_acquisition(-1, user_data);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
1
sigrok.h
1
sigrok.h
|
@ -218,6 +218,7 @@ enum {
|
||||||
HWCAP_CAPTURE_RATIO, /* Set pre/post-trigger capture ratio */
|
HWCAP_CAPTURE_RATIO, /* Set pre/post-trigger capture ratio */
|
||||||
HWCAP_LIMIT_MSEC, /* Set a time limit for sample acquisition */
|
HWCAP_LIMIT_MSEC, /* Set a time limit for sample acquisition */
|
||||||
HWCAP_LIMIT_SAMPLES, /* Set a limit on number of samples */
|
HWCAP_LIMIT_SAMPLES, /* Set a limit on number of samples */
|
||||||
|
HWCAP_CONTINUOUS,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct hwcap_option {
|
struct hwcap_option {
|
||||||
|
|
Loading…
Reference in New Issue