X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Funi-t-ut32x%2Fapi.c;h=a50d4a4fcdcb64a09c4d098b83e46fa6d98d0d67;hb=a9b2283fd038a2a8c3e2dc1ede4fcc51d5e62c7c;hp=87ff065e0294d82ca13148f917c255ce5bd8e3e3;hpb=f254bc4bba68d2cade0c8f7993d8fa8d3d9b556a;p=libsigrok.git diff --git a/src/hardware/uni-t-ut32x/api.c b/src/hardware/uni-t-ut32x/api.c index 87ff065e..a50d4a4f 100644 --- a/src/hardware/uni-t-ut32x/api.c +++ b/src/hardware/uni-t-ut32x/api.c @@ -23,9 +23,9 @@ static const uint32_t devopts[] = { SR_CONF_THERMOMETER, - SR_CONF_LIMIT_SAMPLES, SR_CONF_CONTINUOUS, - SR_CONF_DATA_SOURCE, + SR_CONF_LIMIT_SAMPLES | SR_CONF_GET | SR_CONF_SET, + SR_CONF_DATA_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST, }; static char *channels[] = { @@ -79,9 +79,10 @@ static GSList *scan(GSList *options) /* We have a list of sr_usb_dev_inst matching the connection * string. Wrap them in sr_dev_inst and we're done. */ for (l = usb_devices; l; l = l->next) { - if (!(sdi = sr_dev_inst_new(0, SR_ST_INACTIVE, VENDOR, - MODEL, NULL))) - return NULL; + sdi = sr_dev_inst_new(); + sdi->status = SR_ST_INACTIVE; + sdi->vendor = g_strdup(VENDOR); + sdi->model = g_strdup(MODEL); sdi->driver = di; sdi->inst_type = SR_INST_USB; sdi->conn = l->data;