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},
};
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;
/* 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,
DI_TRIGGER_TYPES,
/* The currently set samplerate in Hz (uint64_t) */
DI_CUR_SAMPLERATE,
+ /* Supported pattern generator modes */
+ DI_PATTERNMODES,
};
/*