Merge pull request #411 from kanoi/bflsc BFL FPGA Windows timeout set to 999ms + usbutils.c usb_cmdname() usb_cmds -> string name
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
diff --git a/usbutils.c b/usbutils.c
index 1c32461..1394147 100644
--- a/usbutils.c
+++ b/usbutils.c
@@ -54,7 +54,7 @@
#ifdef WIN32
#define BFLSC_TIMEOUT_MS 500
-#define BITFORCE_TIMEOUT_MS 500
+#define BITFORCE_TIMEOUT_MS 999
#define MODMINER_TIMEOUT_MS 200
#define AVALON_TIMEOUT_MS 500
#else
@@ -752,6 +752,13 @@ static void cgusb_check_init()
mutex_unlock(&cgusb_lock);
}
+const char *usb_cmdname(enum usb_cmds cmd)
+{
+ cgusb_check_init();
+
+ return usb_commands[cmd];
+}
+
#ifndef WIN32
#include <errno.h>
#include <unistd.h>
diff --git a/usbutils.h b/usbutils.h
index 1454faa..7cacc43 100644
--- a/usbutils.h
+++ b/usbutils.h
@@ -132,6 +132,7 @@ struct device_drv;
struct cgpu_info;
void usb_all(int level);
+const char *usb_cmdname(enum usb_cmds cmd);
void usb_uninit(struct cgpu_info *cgpu);
bool usb_init(struct cgpu_info *cgpu, struct libusb_device *dev, struct usb_find_devices *found);
void usb_detect(struct device_drv *drv, bool (*device_detect)(struct libusb_device *, struct usb_find_devices *));