static const uint32_t devopts[] = {
SR_CONF_OSCILLOSCOPE,
SR_CONF_LOGIC_ANALYZER,
- SR_CONF_SAMPLERATE,
- SR_CONF_TRIGGER_TYPE,
- SR_CONF_TRIGGER_SLOPE,
- SR_CONF_HORIZ_TRIGGERPOS,
-// SR_CONF_CAPTURE_RATIO,
- SR_CONF_LIMIT_SAMPLES,
-// SR_CONF_RLE,
+ SR_CONF_LIMIT_SAMPLES | SR_CONF_SET,
+ SR_CONF_SAMPLERATE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
+ SR_CONF_TRIGGER_TYPE | SR_CONF_LIST,
+ SR_CONF_TRIGGER_SLOPE | SR_CONF_SET,
+ SR_CONF_HORIZ_TRIGGERPOS | SR_CONF_SET,
+ SR_CONF_CAPTURE_RATIO | SR_CONF_SET,
+ SR_CONF_RLE | SR_CONF_SET,
};
/*
//Create the device context and set its params
struct dev_context *devc;
- if (!(devc = g_try_malloc0(sizeof(struct dev_context)))) {
- sr_err("Device context malloc failed.");
- return devices;
- }
+ devc = g_malloc0(sizeof(struct dev_context));
if (mso_parse_serial(iSerial, iProduct, devc) != SR_OK) {
sr_err("Invalid iSerial: %s.", iSerial);
return devices;
}
- struct sr_dev_inst *sdi = sr_dev_inst_new(0, SR_ST_INACTIVE,
- manufacturer, product, hwrev);
+ struct sr_dev_inst *sdi = g_malloc0(sizeof(struct sr_dev_inst));
+ sdi->status = SR_ST_INACTIVE;
+ sdi->vendor = g_strdup(manufacturer);
+ sdi->model = g_strdup(product);
+ sdi->version = g_strdup(hwrev);
if (!sdi) {
sr_err("Unable to create device instance for %s",