Add hashratio frequency command line
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
diff --git a/cgminer.c b/cgminer.c
index 4b5653a..3739118 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -226,6 +226,9 @@ static char *opt_set_avalon2_freq;
static char *opt_set_avalon2_fan;
static char *opt_set_avalon2_voltage;
#endif
+#ifdef USE_HASHRATIO
+#include "driver-hashratio.h"
+#endif
#ifdef USE_KLONDIKE
char *opt_klondike_options = NULL;
#endif
@@ -1323,6 +1326,11 @@ static struct opt_table opt_config_table[] = {
set_int_0_to_200, opt_show_intval, &opt_hfa_target,
"Set the hashfast target temperature (0 to disable)"),
#endif
+#ifdef USE_HASHRATIO
+ OPT_WITH_CBARG("--hro-freq",
+ set_hashratio_freq, opt_show_intval, &opt_hashratio_freq,
+ "Set the hashratio clock frequency"),
+#endif
OPT_WITH_ARG("--hotplug",
set_int_0_to_9999, NULL, &hotplug_time,
#ifdef USE_USBUTILS
diff --git a/driver-hashratio.h b/driver-hashratio.h
index fad1df4..21e37bf 100644
--- a/driver-hashratio.h
+++ b/driver-hashratio.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2013 Con Kolivas <kernel@kolivas.org>
+ * Copyright 2013-2014 Con Kolivas <kernel@kolivas.org>
* Copyright 2012-2014 Xiangfu <xiangfu@openmobilefree.com>
*
* This program is free software; you can redistribute it and/or modify it
@@ -15,6 +15,7 @@
#include "util.h"
#ifdef USE_HASHRATIO
+int opt_hashratio_freq;
#define HRTO_MINER_THREADS 1
@@ -94,8 +95,6 @@ struct hashratio_info {
int temp_sum;
int temp_old;
- int first;
-
struct timeval last_stratum;
struct pool pool;
int pool_no;