Implement explicit SHA256 mode switching for Gridseed
This commit is contained in:
@@ -78,6 +78,12 @@ static const char *str_ltc_reset[] = {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const char *str_btc_reset[] = {
|
||||||
|
"55AA1F2800000000",
|
||||||
|
"55AA1F2800000000",
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
static void set_text_color(WORD color)
|
static void set_text_color(WORD color)
|
||||||
@@ -287,7 +293,10 @@ static void gc3355_init(struct cgpu_info *gridseed, GRIDSEED_INFO *info)
|
|||||||
usb_buffer_clear(gridseed);
|
usb_buffer_clear(gridseed);
|
||||||
usb_read_timeout(gridseed, buf, sizeof(buf), &amount, 10, C_GETRESULTS);
|
usb_read_timeout(gridseed, buf, sizeof(buf), &amount, 10, C_GETRESULTS);
|
||||||
gc3355_send_cmds(gridseed, str_init);
|
gc3355_send_cmds(gridseed, str_init);
|
||||||
if (opt_scrypt) gc3355_send_cmds(gridseed, str_ltc_reset);
|
if (opt_scrypt)
|
||||||
|
gc3355_send_cmds(gridseed, str_ltc_reset);
|
||||||
|
else
|
||||||
|
gc3355_send_cmds(gridseed, str_btc_reset);
|
||||||
gc3355_set_core_freq(gridseed);
|
gc3355_set_core_freq(gridseed);
|
||||||
if (info->voltage)
|
if (info->voltage)
|
||||||
gc3355_switch_voltage(gridseed);
|
gc3355_switch_voltage(gridseed);
|
||||||
@@ -669,7 +678,10 @@ static bool gridseed_prepare_work(struct thr_info __maybe_unused *thr, struct wo
|
|||||||
GRIDSEED_INFO *info = gridseed->device_data;
|
GRIDSEED_INFO *info = gridseed->device_data;
|
||||||
|
|
||||||
cgtime(&info->scanhash_time);
|
cgtime(&info->scanhash_time);
|
||||||
if (opt_scrypt) gc3355_send_cmds(gridseed, str_ltc_reset);
|
if (opt_scrypt)
|
||||||
|
gc3355_send_cmds(gridseed, str_ltc_reset);
|
||||||
|
else
|
||||||
|
gc3355_send_cmds(gridseed, str_btc_reset);
|
||||||
usb_buffer_clear(gridseed);
|
usb_buffer_clear(gridseed);
|
||||||
return gridseed_send_task(gridseed, work);
|
return gridseed_send_task(gridseed, work);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user