return sdi;
}
-SR_PRIV struct sr_dev_inst *sr_dev_inst_get(GSList *dev_insts, int dev_index)
-{
- struct sr_dev_inst *sdi;
- GSList *l;
-
- for (l = dev_insts; l; l = l->next) {
- sdi = (struct sr_dev_inst *)(l->data);
- if (sdi->index == dev_index)
- return sdi;
- }
- sr_warn("could not find device index %d instance", dev_index);
-
- return NULL;
-}
-
SR_PRIV void sr_dev_inst_free(struct sr_dev_inst *sdi)
{
g_free(sdi->priv);
/* Generic device instances */
SR_PRIV struct sr_dev_inst *sr_dev_inst_new(int index, int status,
const char *vendor, const char *model, const char *version);
-SR_PRIV struct sr_dev_inst *sr_dev_inst_get(GSList *dev_insts, int dev_index);
SR_PRIV void sr_dev_inst_free(struct sr_dev_inst *sdi);
SR_PRIV struct sr_probe *sr_probe_new(int index, int type,
gboolean enabled, const char *name);
const char *filename);
#endif
-/*--- hardware/common/misc.c ------------------------------------------------*/
-
-#ifdef HAVE_LIBUSB_1_0
-SR_PRIV int opendev2(int dev_index, struct sr_dev_inst **sdi,
- libusb_device *dev, struct libusb_device_descriptor *des,
- int *skip, uint16_t vid, uint16_t pid, int interface);
-SR_PRIV int opendev3(struct sr_dev_inst **sdi, libusb_device *dev,
- struct libusb_device_descriptor *des,
- uint16_t vid, uint16_t pid, int interface);
-#endif
-
#endif