Merge pull request #298 from giuseppebarba/master
[fw/stlink] / src / stlink-usb.h
index c632a8c4163da3257a61014cf1b614b30e7cc884..58b60e430694e146ae7827c70e01bfe31aeb38a3 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * File:   stlink-usb.h
  * Author: karl
  *
 extern "C" {
 #endif
 
-#include <libusb-1.0/libusb.h>
+#include <libusb.h>
 #include "stlink-common.h"
-    
+
 #define STLINK_SG_SIZE 31
 #define STLINK_CMD_SIZE 16
 
-#if defined(CONFIG_USE_LIBUSB)
     struct stlink_libusb {
         libusb_context* libusb_ctx;
         libusb_device_handle* usb_handle;
@@ -30,13 +29,8 @@ extern "C" {
         unsigned int sg_transfer_idx;
         unsigned int cmd_len;
     };
-#else
-#error "it's all bad!"
-    struct stlink_libusb {};
-#endif
 
-    
-    stlink_t* stlink_open_usb(const int verbose);
+    stlink_t* stlink_open_usb(const int verbose, int reset);
 
 
 #ifdef __cplusplus