mirror of https://github.com/rusefi/dfu_java.git
making things reusable by Android
This commit is contained in:
parent
c01cc60ab0
commit
3395172a36
|
@ -8,7 +8,7 @@ import java.nio.ByteBuffer;
|
|||
|
||||
public class DfuLogic {
|
||||
public static final short ST_VENDOR = 0x0483;
|
||||
public static final short ST_DFU_PRODUCT = (short) 0xdf11;
|
||||
public static final int ST_DFU_PRODUCT = 0xdf11;
|
||||
public static final byte USB_CLASS_APP_SPECIFIC = (byte) 0xfe;
|
||||
public static final byte DFU_SUBCLASS = 0x01;
|
||||
public static final byte USB_DT_DFU = 0x21;
|
||||
|
|
|
@ -26,7 +26,7 @@ public class DfuDeviceLocator {
|
|||
}
|
||||
|
||||
public static USBDfuConnection findDevice() {
|
||||
return findDevice(openContext(), DfuLogic.ST_VENDOR, DfuLogic.ST_DFU_PRODUCT);
|
||||
return findDevice(openContext(), DfuLogic.ST_VENDOR, (short) DfuLogic.ST_DFU_PRODUCT);
|
||||
}
|
||||
|
||||
private static USBDfuConnection findDevice(Context context, short vendorId, short productId) {
|
||||
|
|
Loading…
Reference in New Issue