Browse Source

Icarus add delays during intialisation

nfactor-troky
Kano 12 years ago
parent
commit
77d040cb67
  1. 14
      driver-icarus.c

14
driver-icarus.c

@ -333,6 +333,8 @@ static void icarus_initialise(struct cgpu_info *icarus, int baud) @@ -333,6 +333,8 @@ static void icarus_initialise(struct cgpu_info *icarus, int baud)
break;
case IDENT_ICA:
nmsleep(20);
// Set Data Control
transfer(icarus, PL2303_CTRL_OUT, PL2303_REQUEST_CTRL, PL2303_VALUE_CTRL,
icarus->usbdev->found->interface, C_SETDATA);
@ -340,6 +342,8 @@ static void icarus_initialise(struct cgpu_info *icarus, int baud) @@ -340,6 +342,8 @@ static void icarus_initialise(struct cgpu_info *icarus, int baud)
if (icarus->usbinfo.nodev)
return;
nmsleep(20);
// Set Line Control
uint32_t ica_data[2] = { PL2303_VALUE_LINE0, PL2303_VALUE_LINE1 };
_transfer(icarus, PL2303_CTRL_OUT, PL2303_REQUEST_LINE, PL2303_VALUE_LINE,
@ -349,12 +353,18 @@ static void icarus_initialise(struct cgpu_info *icarus, int baud) @@ -349,12 +353,18 @@ static void icarus_initialise(struct cgpu_info *icarus, int baud)
if (icarus->usbinfo.nodev)
return;
nmsleep(20);
// Vendor
transfer(icarus, PL2303_VENDOR_OUT, PL2303_REQUEST_VENDOR, PL2303_VALUE_VENDOR,
icarus->usbdev->found->interface, C_VENDOR);
nmsleep(20);
break;
case IDENT_AMU:
nmsleep(20);
// Set data control
transfer(icarus, CP210X_TYPE_OUT, CP210X_REQUEST_DATA, CP210X_VALUE_DATA,
icarus->usbdev->found->interface, C_SETDATA);
@ -362,12 +372,16 @@ static void icarus_initialise(struct cgpu_info *icarus, int baud) @@ -362,12 +372,16 @@ static void icarus_initialise(struct cgpu_info *icarus, int baud)
if (icarus->usbinfo.nodev)
return;
nmsleep(20);
// Set the baud
uint32_t data = CP210X_DATA_BAUD;
_transfer(icarus, CP210X_TYPE_OUT, CP210X_REQUEST_BAUD, 0,
icarus->usbdev->found->interface,
&data, sizeof(data), C_SETBAUD);
nmsleep(20);
break;
default:
quit(1, "icarus_intialise() called with invalid %s cgid %i ident=%d",

Loading…
Cancel
Save