Export bitfury_checkresults in libbitfury
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
diff --git a/driver-bitfury.c b/driver-bitfury.c
index 8809e85..7305f70 100644
--- a/driver-bitfury.c
+++ b/driver-bitfury.c
@@ -747,24 +747,6 @@ static bool bitfury_prepare(struct thr_info *thr)
}
}
-#define BT_OFFSETS 3
-const uint32_t bf_offsets[] = {-0x800000, 0, -0x400000};
-
-static bool bitfury_checkresults(struct thr_info *thr, struct work *work, uint32_t nonce)
-{
- int i;
-
- for (i = 0; i < BT_OFFSETS; i++) {
- uint32_t noffset = nonce + bf_offsets[i];
-
- if (test_nonce(work, noffset)) {
- submit_tested_work(thr, work);
- return true;
- }
- }
- return false;
-}
-
static int64_t bitfury_rate(struct bitfury_info *info)
{
double nonce_rate;
diff --git a/libbitfury.c b/libbitfury.c
index 88beb45..97e784d 100644
--- a/libbitfury.c
+++ b/libbitfury.c
@@ -316,6 +316,24 @@ bool spi_txrx(struct cgpu_info *bitfury, struct bitfury_info *info)
return true;
}
+#define BT_OFFSETS 3
+
+bool bitfury_checkresults(struct thr_info *thr, struct work *work, uint32_t nonce)
+{
+ const uint32_t bf_offsets[] = {-0x800000, 0, -0x400000};
+ int i;
+
+ for (i = 0; i < BT_OFFSETS; i++) {
+ uint32_t noffset = nonce + bf_offsets[i];
+
+ if (test_nonce(work, noffset)) {
+ submit_tested_work(thr, work);
+ return true;
+ }
+ }
+ return false;
+}
+
bool libbitfury_sendHashData(struct thr_info *thr, struct cgpu_info *bitfury,
struct bitfury_info *info)
{
diff --git a/libbitfury.h b/libbitfury.h
index 639a29e..b2075ed 100644
--- a/libbitfury.h
+++ b/libbitfury.h
@@ -25,6 +25,7 @@ void spi_add_data(struct bitfury_info *info, uint16_t addr, const void *buf, int
bool spi_detect_bitfury(struct cgpu_info *bitfury, struct bitfury_info *info);
bool spi_reset(struct cgpu_info *bitfury, struct bitfury_info *info);
bool spi_txrx(struct cgpu_info *bitfury, struct bitfury_info *info);
+bool bitfury_checkresults(struct thr_info *thr, struct work *work, uint32_t nonce);
bool libbitfury_sendHashData(struct thr_info *thr, struct cgpu_info *bitfury,
struct bitfury_info *info);