mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-23 04:54:26 +00:00
Perform interrupt read flush as per serial open on BF1 devices.
This commit is contained in:
parent
7deaa91b26
commit
1f74b2cdc4
@ -29,6 +29,10 @@ static void bitfury_empty_buffer(struct cgpu_info *bitfury)
|
|||||||
|
|
||||||
static void bitfury_open(struct cgpu_info *bitfury)
|
static void bitfury_open(struct cgpu_info *bitfury)
|
||||||
{
|
{
|
||||||
|
char buf[8];
|
||||||
|
int amount;
|
||||||
|
|
||||||
|
usb_read_ii(bitfury, 0, buf, 8, &amount, C_BF1_IFLUSH);
|
||||||
/* Magic open sequence */
|
/* Magic open sequence */
|
||||||
usb_transfer(bitfury, 0x21, 0x22, 0x0003, 0, C_BF1_OPEN);
|
usb_transfer(bitfury, 0x21, 0x22, 0x0003, 0, C_BF1_OPEN);
|
||||||
bitfury_empty_buffer(bitfury);
|
bitfury_empty_buffer(bitfury);
|
||||||
|
@ -335,6 +335,7 @@ struct cg_usb_info {
|
|||||||
USB_ADD_COMMAND(C_BF1_GETWORK, "BF1GetWork") \
|
USB_ADD_COMMAND(C_BF1_GETWORK, "BF1GetWork") \
|
||||||
USB_ADD_COMMAND(C_BF1_GETRES, "BF1GetResults") \
|
USB_ADD_COMMAND(C_BF1_GETRES, "BF1GetResults") \
|
||||||
USB_ADD_COMMAND(C_BF1_FLUSH, "BF1Flush") \
|
USB_ADD_COMMAND(C_BF1_FLUSH, "BF1Flush") \
|
||||||
|
USB_ADD_COMMAND(C_BF1_IFLUSH, "BF1InterruptFlush") \
|
||||||
USB_ADD_COMMAND(C_BF1_IDENTIFY, "BF1Identify")
|
USB_ADD_COMMAND(C_BF1_IDENTIFY, "BF1Identify")
|
||||||
|
|
||||||
/* Create usb_cmds enum from USB_PARSE_COMMANDS macro */
|
/* Create usb_cmds enum from USB_PARSE_COMMANDS macro */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user