X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fstlink-usb.h;h=938c07bcbf985a78e747fc98fb3c0c299368fcda;hb=907383da8ef95fedc630cdf7cf102d44ae229200;hp=4ed655b7e29c1b9e6a634f1f74b0e78bbd774b37;hpb=1d8b0c600b3a96ded8b649adb81511aa6eeb47d2;p=fw%2Fstlink diff --git a/src/stlink-usb.h b/src/stlink-usb.h index 4ed655b..938c07b 100644 --- a/src/stlink-usb.h +++ b/src/stlink-usb.h @@ -1,4 +1,4 @@ -/* +/* * File: stlink-usb.h * Author: karl * @@ -12,27 +12,23 @@ extern "C" { #endif -#include +#include #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; - struct libusb_transfer* req_trans; - struct libusb_transfer* rep_trans; unsigned int ep_req; unsigned int ep_rep; + int protocoll; + 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 char *dev_name, const int verbose); + stlink_t* stlink_open_usb(const int verbose, int reset, char *p_usb_iserial); #ifdef __cplusplus