#define OSCI_VIDPID "04b4.1004"
static const int hwopts[] = {
- SR_HWOPT_CONN,
- SR_HWOPT_SERIALCOMM,
+ SR_CONF_CONN,
+ SR_CONF_SERIALCOMM,
0,
};
static const int hwcaps[] = {
- SR_HWCAP_OSCILLOSCOPE,
- SR_HWCAP_LIMIT_SAMPLES,
- SR_HWCAP_CONTINUOUS,
- SR_HWCAP_TIMEBASE,
- SR_HWCAP_VDIV,
+ SR_CONF_OSCILLOSCOPE,
+ SR_CONF_LIMIT_SAMPLES,
+ SR_CONF_CONTINUOUS,
+ SR_CONF_TIMEBASE,
+ SR_CONF_VDIV,
0,
};
};
static const char *probe_names[] = {
- "CHA",
- "CHB",
+ "CHA", "CHB",
NULL,
};
struct dev_context *devc;
struct sr_dev_inst *sdi;
struct sr_usb_dev_inst *usb;
- struct sr_hwopt *opt;
+ struct sr_config *src;
struct sr_probe *probe;
libusb_device *dev;
GSList *usb_devices, *devices, *l;
conn = NULL;
for (l = options; l; l = l->next) {
- opt = l->data;
- switch (opt->hwopt) {
- case SR_HWOPT_CONN:
- conn = opt->value;
+ src = l->data;
+ switch (src->key) {
+ case SR_CONF_CONN:
+ conn = src->value;
break;
}
}
static int hw_dev_open(struct sr_dev_inst *sdi)
{
+
/* TODO */
+ (void)sdi;
return SR_OK;
}
static int hw_dev_close(struct sr_dev_inst *sdi)
{
+
/* TODO */
+ (void)sdi;
return SR_OK;
}
static int hw_info_get(int info_id, const void **data,
const struct sr_dev_inst *sdi)
{
- switch (info_id) {
/* TODO */
+ (void)data;
+ (void)sdi;
+
+ switch (info_id) {
default:
- sr_err("Unknown info_id: %d.", info_id);
return SR_ERR_ARG;
}
{
int ret;
+ /* TODO */
+ (void)value;
+
if (sdi->status != SR_ST_ACTIVE) {
sr_err("Device inactive, can't set config options.");
return SR_ERR;
ret = SR_OK;
switch (hwcap) {
- /* TODO */
+
default:
sr_err("Unknown hardware capability: %d.", hwcap);
ret = SR_ERR_ARG;
void *cb_data)
{
/* TODO */
+ (void)sdi;
+ (void)cb_data;
return SR_OK;
}