#include <QApplication>#include "mainwindow.h"#include "libusb.h"#define DEV_VID 0x0483#define DEV_PID 0x3748 #define DEV_CONFIG 1#define DEV_INTF 0#define EP_IN 0x81#define USB_DEBUG_LEVEL 0int main(int argc, char *argv[]){libusb_init(NULL);libusb_set_debug(NULL, USB_DEBUG_LEVEL); // уровень вывода отладочных сообщенийlibusb_device_handle *handle = libusb_open_device_with_vid_pid(NULL, DEV_VID, DEV_PID);if (handle == NULL) {return 1;}elsereturn 2;QApplication a(argc, argv);MainWindow w;w.show();return a.exec();}
unsigned char buffer[1];static int transferred;ret = libusb_bulk_transfer(handle,EP_IN,buffer,1, &transferred,1000);