add icarus to cgminer.c
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
diff --git a/cgminer.c b/cgminer.c
index 8264db5..3bd4eb0 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -399,7 +399,7 @@ static char *set_int_1_to_10(const char *arg, int *i)
return set_int_range(arg, i, 1, 10);
}
-#ifdef USE_BITFORCE
+#if defined(USE_BITFORCE) || defined(USE_ICARUS)
static char *add_serial(char *arg)
{
string_elist_add(arg, &scan_devices);
@@ -661,7 +661,7 @@ static struct opt_table opt_config_table[] = {
OPT_WITHOUT_ARG("--disable-gpu|-G",
opt_set_bool, &opt_nogpu,
"Disable GPU mining even if suitable devices exist"),
-#if defined(WANT_CPUMINE) && (defined(HAVE_OPENCL) || defined(USE_BITFORCE))
+#if defined(WANT_CPUMINE) && (defined(HAVE_OPENCL) || defined(USE_BITFORCE) || defined(USE_ICARUS))
OPT_WITHOUT_ARG("--enable-cpu|-C",
opt_set_bool, &opt_usecpu,
"Enable CPU mining with other mining (default: no CPU mining if other devices exist)"),
@@ -776,10 +776,10 @@ static struct opt_table opt_config_table[] = {
OPT_WITHOUT_ARG("--round-robin",
set_rr, &pool_strategy,
"Change multipool strategy from failover to round robin on failure"),
-#ifdef USE_BITFORCE
+#if defined(USE_BITFORCE) || defined(USE_ICARUS)
OPT_WITH_ARG("--scan-serial|-S",
add_serial, NULL, NULL,
- "Serial port to probe for BitForce device"),
+ "Serial port to probe for FPGA Mining device"),
#endif
OPT_WITH_ARG("--scan-time|-s",
set_int_0_to_9999, opt_show_intval, &opt_scantime,
@@ -961,6 +961,9 @@ static char *opt_verusage_and_exit(const char *extra)
#ifdef USE_BITFORCE
"bitforce "
#endif
+#ifdef USE_ICARUS
+ "icarus "
+#endif
"mining support.\n"
, packagename);
printf("%s", opt_usage(opt_argv0, extra));
@@ -4153,6 +4156,10 @@ struct device_api cpu_api = {
extern struct device_api bitforce_api;
#endif
+#ifdef USE_ICARUS
+extern struct device_api icarus_api;
+#endif
+
static int cgminer_id_count = 0;
@@ -4307,6 +4314,10 @@ int main (int argc, char *argv[])
bitforce_api.api_detect();
#endif
+#ifdef USE_ICARUS
+ icarus_api.api_detect();
+#endif
+
#ifdef WANT_CPUMINE
cpu_api.api_detect();
#endif