mirror of https://github.com/rusefi/dfu_java.git
making things reusable by Android
This commit is contained in:
parent
bee24af97d
commit
e9d3f2c3f0
|
@ -12,6 +12,7 @@ public class DfuLogic {
|
|||
public static final int USB_CLASS_APP_SPECIFIC = 0xfe;
|
||||
public static final byte DFU_SUBCLASS = 0x01;
|
||||
public static final byte USB_DT_DFU = 0x21;
|
||||
public static final String FLASH_TAG = "Flash";
|
||||
|
||||
static void uploadImage(USBDfuConnection device, HexImage image) {
|
||||
// todo: smarter erase handling!
|
||||
|
|
|
@ -144,7 +144,7 @@ public class DfuDeviceLocator {
|
|||
|
||||
String stringDescriptor = LibUsb.getStringDescriptor(deviceHandle, setting.iInterface());
|
||||
log.info("StringDescriptor: " + stringDescriptor);
|
||||
if (stringDescriptor.contains("Flash"))
|
||||
if (stringDescriptor.contains(DfuLogic.FLASH_TAG))
|
||||
flashRange = DfuSeFlashDescriptor.parse(stringDescriptor);
|
||||
|
||||
result = LibUsb.claimInterface(deviceHandle, interfaceNumber);
|
||||
|
|
Loading…
Reference in New Issue