Add bf1 device information to usbutils to enable device detection.
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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
diff --git a/usbutils.c b/usbutils.c
index f8399a2..4ce1c33 100644
--- a/usbutils.c
+++ b/usbutils.c
@@ -66,6 +66,10 @@
#define DRV_AVALON 6
#endif
+#ifdef USE_BITFURY
+#define DRV_BITFURY 8
+#endif
+
#define DRV_LAST -1
#define USB_CONFIG 1
@@ -73,12 +77,14 @@
#ifdef WIN32
#define BFLSC_TIMEOUT_MS 999
#define BITFORCE_TIMEOUT_MS 999
+#define BITFURY_TIMEOUT_MS 999
#define MODMINER_TIMEOUT_MS 999
#define AVALON_TIMEOUT_MS 999
#define ICARUS_TIMEOUT_MS 999
#else
#define BFLSC_TIMEOUT_MS 300
#define BITFORCE_TIMEOUT_MS 200
+#define BITFURY_TIMEOUT_MS 200
#define MODMINER_TIMEOUT_MS 100
#define AVALON_TIMEOUT_MS 200
#define ICARUS_TIMEOUT_MS 200
@@ -116,6 +122,17 @@ static struct usb_intinfo bfl_ints[] = {
};
#endif
+#ifdef USE_BITFURY
+static struct usb_epinfo bfu_epinfos[] = {
+ { LIBUSB_TRANSFER_TYPE_BULK, 64, EPI(3), 0 },
+ { LIBUSB_TRANSFER_TYPE_BULK, 64, EPO(4), 0 }
+};
+
+static struct usb_intinfo bfu_ints[] = {
+ USB_EPS(1, bfu_epinfos)
+};
+#endif
+
#ifdef USE_MODMINER
static struct usb_epinfo mmq_epinfos[] = {
{ LIBUSB_TRANSFER_TYPE_BULK, 64, EPI(3), 0 },
@@ -246,6 +263,21 @@ static struct usb_find_devices find_dev[] = {
.latency = LATENCY_STD,
INTINFO(bfl_ints) },
#endif
+#ifdef USE_BITFURY
+ {
+ .drv = DRV_BITFURY,
+ .name = "BFO",
+ .ident = IDENT_BFU,
+ .idVendor = 0x03eb,
+ .idProduct = 0x204b,
+ .config = 1,
+ .timeout = BITFURY_TIMEOUT_MS,
+ .latency = LATENCY_UNUSED,
+ .iManufacturer = "BPMC",
+ .iProduct = "Bitfury BF1",
+ INTINFO(bfu_ints)
+ },
+#endif
#ifdef USE_MODMINER
{
.drv = DRV_MODMINER,
diff --git a/usbutils.h b/usbutils.h
index 779c057..05a7b67 100644
--- a/usbutils.h
+++ b/usbutils.h
@@ -134,6 +134,7 @@ enum sub_ident {
IDENT_BAS,
IDENT_BAM,
IDENT_BFL,
+ IDENT_BFU,
IDENT_MMQ,
IDENT_AVA,
IDENT_BTB,