Random libbitfury changes.
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
diff --git a/driver-bitfury.h b/driver-bitfury.h
index 9c1fa86..b60025f 100644
--- a/driver-bitfury.h
+++ b/driver-bitfury.h
@@ -85,7 +85,7 @@ struct bitfury_info {
unsigned newbuf[20];
unsigned oldbuf[20];
int job_switched;
- int results[16];
+ unsigned int results[16];
int results_n;
struct work *work;
struct work *owork;
diff --git a/libbitfury.c b/libbitfury.c
index fb7e876..f84b0cd 100644
--- a/libbitfury.c
+++ b/libbitfury.c
@@ -209,6 +209,7 @@ bool spi_reset(struct cgpu_info *bitfury, struct bitfury_info *info)
// SCK_OVRRIDE
mcp->value.pin[NF1_PIN_SCK_OVR] = MCP2210_GPIO_PIN_HIGH;
mcp->direction.pin[NF1_PIN_SCK_OVR] = MCP2210_GPIO_OUTPUT;
+ mcp->designation.pin[NF1_PIN_SCK_OVR] = MCP2210_PIN_GPIO;
if (!mcp2210_set_gpio_settings(bitfury, mcp))
return false;
@@ -220,11 +221,10 @@ bool spi_reset(struct cgpu_info *bitfury, struct bitfury_info *info)
return false;
}
+ // Deactivate override
mcp->direction.pin[NF1_PIN_SCK_OVR] = MCP2210_GPIO_INPUT;
if (!mcp2210_set_gpio_settings(bitfury, mcp))
return false;
- if (!mcp2210_get_gpio_pinval(bitfury, NF1_PIN_SCK_OVR, &r))
- return false;
return true;
}
@@ -288,7 +288,7 @@ void libbitfury_sendHashData(struct cgpu_info *bf)
if (second_run && info->job_switched) {
int i;
int results_num = 0;
- unsigned *results = info->results;
+ unsigned int *results = info->results;
for (i = 0; i < 16; i++) {
if (oldbuf[i] != newbuf[i]) {