- reset updated

- hex log instead of decimal

git-svn-id: https://svn.code.sf.net/p/libusbjava/code/trunk@40 94ad28fe-ef68-46b1-9651-e7ae4fcf1c4c
This commit is contained in:
schlaepfer
2005-11-10 07:33:46 +00:00
parent 3fd8a36f66
commit 1acb520270

View File

@@ -11,7 +11,7 @@ public class USB {
private static final int TIMEOUT_ERROR_CODE = -116;
private static final boolean DEBUG_ON = false;
private static final boolean DEBUG_ON = true;
private static Usb_Bus bus;
@@ -84,8 +84,9 @@ public class USB {
bus = bus.next;
}
if (usb_dev_handle <= 0) {
throw new USBException("UsbDevice with idVendor " + IdVendor
+ " and idProduct " + IdProduct + " not found");
throw new USBException("UsbDevice with idVendor 0x"
+ Integer.toHexString(IdVendor & 0xFFFF) + " and idProduct 0x"
+ Integer.toHexString(IdProduct & 0xFFFF) + " not found");
}
}
claim_interface(usb_dev_handle, Configuration, Interface, Altinterface);
@@ -107,11 +108,12 @@ public class USB {
}
}
public static void resetUsbDevie() throws USBException {
public static void resetUsbDevice() throws USBException {
if (LibusbWin.usb_reset(usb_dev_handle) < 0) {
throw new USBException("LibusbWin.usb_reset: "
+ LibusbWin.usb_strerror());
}
usb_dev_handle = 0;
if (DEBUG_ON) {
System.out.println("resetUsbDevie done");