Browse Source

Merge pull request #439 from kanoi/master

Icarus AMU enable the UART
nfactor-troky
kanoi 12 years ago
parent
commit
baf50def39
  1. 10
      driver-icarus.c
  2. 2
      usbutils.h

10
driver-icarus.c

@ -364,6 +364,16 @@ static void icarus_initialise(struct cgpu_info *icarus, int baud)
case IDENT_AMU: case IDENT_AMU:
nmsleep(20); nmsleep(20);
// Enable the UART
transfer(icarus, CP210X_TYPE_OUT, CP210X_REQUEST_IFC_ENABLE,
CP210X_VALUE_UART_ENABLE,
icarus->usbdev->found->interface, C_PURGETX);
if (icarus->usbinfo.nodev)
return;
nmsleep(20);
// Set data control // Set data control
transfer(icarus, CP210X_TYPE_OUT, CP210X_REQUEST_DATA, CP210X_VALUE_DATA, transfer(icarus, CP210X_TYPE_OUT, CP210X_REQUEST_DATA, CP210X_VALUE_DATA,
icarus->usbdev->found->interface, C_SETDATA); icarus->usbdev->found->interface, C_SETDATA);

2
usbutils.h

@ -68,9 +68,11 @@
// For 0x10c4:0xea60 USB cp210x chip - AMU // For 0x10c4:0xea60 USB cp210x chip - AMU
#define CP210X_TYPE_OUT 0x41 #define CP210X_TYPE_OUT 0x41
#define CP210X_REQUEST_IFC_ENABLE 0x00
#define CP210X_REQUEST_DATA 0x07 #define CP210X_REQUEST_DATA 0x07
#define CP210X_REQUEST_BAUD 0x1e #define CP210X_REQUEST_BAUD 0x1e
#define CP210X_VALUE_UART_ENABLE 0x0001
#define CP210X_VALUE_DATA 0x0303 #define CP210X_VALUE_DATA 0x0303
#define CP210X_DATA_BAUD 0x0001c200 #define CP210X_DATA_BAUD 0x0001c200

Loading…
Cancel
Save