AntS1 - add detection information to usbutils
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
diff --git a/usbutils.c b/usbutils.c
index ecb5aca..204dd6b 100644
--- a/usbutils.c
+++ b/usbutils.c
@@ -60,6 +60,9 @@ static cgtimer_t usb11_cgt;
#define DRILLBIT_TIMEOUT_MS 999
#define ICARUS_TIMEOUT_MS 999
+// There is no windows version
+#define ANT_S1_TIMEOUT_MS 200
+
#ifdef WIN32
#define BFLSC_TIMEOUT_MS 999
#define BITFORCE_TIMEOUT_MS 999
@@ -323,6 +326,17 @@ static struct usb_intinfo cointerra_ints[] = {
};
#endif
+#ifdef USE_ANT_S1
+static struct usb_epinfo ants1_epinfos[] = {
+ { LIBUSB_TRANSFER_TYPE_BULK, 64, EPI(1), 0, 0 },
+ { LIBUSB_TRANSFER_TYPE_BULK, 64, EPO(1), 0, 0 }
+};
+
+static struct usb_intinfo ants1_ints[] = {
+ USB_EPS(0, ants1_epinfos)
+};
+#endif
+
#define IDVENDOR_FTDI 0x0403
#define INTINFO(_ints) \
@@ -589,6 +603,18 @@ static struct usb_find_devices find_dev[] = {
.latency = LATENCY_STD,
INTINFO(cointerra_ints) },
#endif
+#ifdef USE_ANT_S1
+ {
+ .drv = DRIVER_ants1,
+ .name = "ANT",
+ .ident = IDENT_ANT,
+ .idVendor = 0x4254,
+ .idProduct = 0x4153,
+ .config = 1,
+ .timeout = ANT_S1_TIMEOUT_MS,
+ .latency = LATENCY_ANTS1,
+ INTINFO(ants1_ints) },
+#endif
{ DRIVER_MAX, NULL, 0, 0, 0, NULL, NULL, 0, 0, 0, 0, NULL }
};
diff --git a/usbutils.h b/usbutils.h
index 4a40475..db360d0 100644
--- a/usbutils.h
+++ b/usbutils.h
@@ -135,6 +135,7 @@ struct usb_intinfo {
enum sub_ident {
IDENT_UNK = 0,
IDENT_AMU,
+ IDENT_ANT,
IDENT_ANU,
IDENT_AVA,
IDENT_BAJ,
@@ -179,6 +180,7 @@ struct usb_find_devices {
* baud rate, to avoid status bytes being interleaved in larger transfers. */
#define LATENCY_UNUSED 0
#define LATENCY_STD 32
+#define LATENCY_ANTS1 10
enum usb_types {
USB_TYPE_STD = 0,