Add hashfast to api calls.
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
diff --git a/api.c b/api.c
index e962bb0..af57562 100644
--- a/api.c
+++ b/api.c
@@ -28,7 +28,7 @@
#include "miner.h"
#include "util.h"
-#if defined(USE_BFLSC) || defined(USE_AVALON)
+#if defined(USE_BFLSC) || defined(USE_AVALON) || defined(USE_HASHFAST)
#define HAVE_AN_ASIC 1
#endif
@@ -175,6 +175,9 @@ static const char *DEVICECODE = ""
#ifdef USE_BITFORCE
"BFL "
#endif
+#ifdef USE_HASHFAST
+ "HFA "
+#endif
#ifdef USE_ICARUS
"ICA "
#endif
@@ -1223,6 +1226,10 @@ static int numascs()
if (devices[i]->drv->drv_id == DRIVER_BFLSC)
count++;
#endif
+#ifdef USE_HASHFAST
+ if (devices[i]->drv->drv_id == DRIVER_HASHFAST)
+ count++;
+#endif
}
rd_unlock(&devices_lock);
return count;
@@ -1243,6 +1250,10 @@ static int ascdevice(int ascid)
if (devices[i]->drv->drv_id == DRIVER_BFLSC)
count++;
#endif
+#ifdef USE_HASHFAST
+ if (devices[i]->drv->drv_id == DRIVER_HASHFAST)
+ count++;
+#endif
if (count == (ascid + 1))
goto foundit;
}