add new HWCAP patternmode
This commit is contained in:
parent
63570167d6
commit
925dbf9f97
|
@ -39,6 +39,7 @@ GSList *plugins;
|
|||
struct hwcap_option hwcap_options[] = {
|
||||
{HWCAP_SAMPLERATE, T_UINT64, "Sample rate", "samplerate"},
|
||||
{HWCAP_CAPTURE_RATIO, T_UINT64, "Pre-trigger capture ratio", "captureratio"},
|
||||
{HWCAP_PATTERN_MODE, T_CHAR, "Pattern generator mode", "patternmode"},
|
||||
{0, 0, NULL, NULL},
|
||||
};
|
||||
|
||||
|
@ -105,9 +106,9 @@ struct sigrok_device_instance *sigrok_device_instance_new(int index, int status,
|
|||
sdi->index = index;
|
||||
sdi->status = status;
|
||||
sdi->instance_type = -1;
|
||||
sdi->vendor = strdup(vendor);
|
||||
sdi->model = strdup(model);
|
||||
sdi->version = strdup(version);
|
||||
sdi->vendor = vendor ? strdup(vendor) : strdup("(unknown)");
|
||||
sdi->model = model ? strdup(model) : NULL;
|
||||
sdi->version = version ? strdup(version) : NULL;
|
||||
sdi->priv = NULL;
|
||||
sdi->usb = NULL;
|
||||
|
||||
|
|
8
sigrok.h
8
sigrok.h
|
@ -213,10 +213,16 @@ extern GSList *devices;
|
|||
/* Hardware plugin capabilities */
|
||||
enum {
|
||||
HWCAP_DUMMY, /* Used to terminate lists */
|
||||
/* device classes */
|
||||
HWCAP_LOGIC_ANALYZER,
|
||||
|
||||
/* device options */
|
||||
HWCAP_SAMPLERATE, /* Change samplerate */
|
||||
HWCAP_PROBECONFIG, /* Configure probe mask */
|
||||
HWCAP_CAPTURE_RATIO, /* Set pre/post-trigger capture ratio */
|
||||
HWCAP_PATTERN_MODE, /* Pattern generator mode */
|
||||
|
||||
/* acquisition modes */
|
||||
HWCAP_LIMIT_MSEC, /* Set a time limit for sample acquisition */
|
||||
HWCAP_LIMIT_SAMPLES, /* Set a limit on number of samples */
|
||||
HWCAP_CONTINUOUS,
|
||||
|
@ -289,6 +295,8 @@ enum {
|
|||
DI_TRIGGER_TYPES,
|
||||
/* The currently set samplerate in Hz (uint64_t) */
|
||||
DI_CUR_SAMPLERATE,
|
||||
/* Supported pattern generator modes */
|
||||
DI_PATTERNMODES,
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue