X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fstlink-usb.h;h=2f3b8cc3ed7f84c17994debaaa68da442aaf86bd;hb=52b626bd16ae76df6c40d93c1d10efd334f01cec;hp=4b8b46b08b370d91b827192dcda074854370c658;hpb=d31396111db210a9282da993656a1bb46465cfcd;p=fw%2Fstlink diff --git a/src/stlink-usb.h b/src/stlink-usb.h index 4b8b46b..2f3b8cc 100644 --- a/src/stlink-usb.h +++ b/src/stlink-usb.h @@ -14,8 +14,10 @@ extern "C" { #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; @@ -23,14 +25,12 @@ extern "C" { 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); #ifdef __cplusplus