- mcdp renamed to java

git-svn-id: https://svn.code.sf.net/p/libusbjava/code/trunk@144 94ad28fe-ef68-46b1-9651-e7ae4fcf1c4c
This commit is contained in:
schlaepfer
2006-05-05 08:43:29 +00:00
parent 1468369ac7
commit 86ac913d63
23 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
package ch.ntb.usb;
public class Usb_Interface_Descriptor {
public static final int USB_MAXINTERFACES = 32;
public byte bLength;
public byte bDescriptorType;
public byte bInterfaceNumber;
public byte bAlternateSetting;
public byte bNumEndpoints;
public byte bInterfaceClass;
public byte bInterfaceSubClass;
public byte bInterfaceProtocol;
public byte iInterface;
public Usb_Endpoint_Descriptor[] endpoint;
// TODO: Extra descriptors are not interpreted because of their unknown
// structure
public Usb_Interface_Descriptor extra; /* Extra descriptors */
public int extralen;
public String toString() {
StringBuffer sb = new StringBuffer();
sb.append("** Usb_Interface_Descriptor **\n");
sb.append("\tblenght: " + bLength + "\n");
sb.append("\tbDescriptorType: " + bDescriptorType + "\n");
sb.append("\tbInterfaceNumber: " + bInterfaceNumber + "\n");
sb.append("\tbAlternateSetting: " + bAlternateSetting + "\n");
sb.append("\tbNumEndpoints: " + bNumEndpoints + "\n");
sb.append("\tbInterfaceClass: 0x"
+ Integer.toHexString(bInterfaceClass & 0xFF) + "\n");
sb.append("\tbInterfaceSubClass: 0x"
+ Integer.toHexString(bInterfaceSubClass & 0xFF) + "\n");
sb.append("\tbInterfaceProtocol: 0x"
+ Integer.toHexString(bInterfaceProtocol & 0xFF) + "\n");
sb.append("\tiInterface: " + iInterface + "\n");
return sb.toString();
}
}