#include <memory.h>
#include <glib.h>
#include <libusb.h>
-#include "libsigrok.h"
+#include <libsigrok/libsigrok.h>
#include "libsigrok-internal.h"
/* SR_CONF_CONN takes one of these: */
return ret;
}
+SR_PRIV void sr_usb_close(struct sr_usb_dev_inst *usb)
+{
+ libusb_close(usb->devhdl);
+ usb->devhdl = NULL;
+ sr_dbg("Closed USB device %d.%d.", usb->bus, usb->address);
+}
+
#ifdef _WIN32
/* Thread used to run libusb_wait_for_event() and set a pollable event. */
static gpointer usb_thread(gpointer data)