Skip to content

Commit

Permalink
Removed deprecated LIBUSBX_API
Browse files Browse the repository at this point in the history
Closes #211 #782.
See also #733.
  • Loading branch information
Nightwalker-87 committed Mar 23, 2020
1 parent 10ae529 commit d2b5f8d
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/sg.c
Original file line number Diff line number Diff line change
Expand Up @@ -936,14 +936,7 @@ static stlink_t* stlink_open(const int verbose) {
return NULL;
}

#if defined (__FreeBSD__)
#define LIBUSBX_API_VERSION LIBUSB_API_VERSION
#endif
#if LIBUSBX_API_VERSION < 0x01000106
libusb_set_debug(slsg->libusb_ctx, 3);
#else
libusb_set_option(slsg->libusb_ctx, LIBUSB_OPTION_LOG_LEVEL, 3);
#endif

slsg->usb_handle = libusb_open_device_with_vid_pid(slsg->libusb_ctx, STLINK_USB_VID_ST, STLINK_USB_PID_STLINK);
if (slsg->usb_handle == NULL) {
Expand Down

0 comments on commit d2b5f8d

Please sign in to comment.