Files
jlibusb/mcdp/src/ch/ntb/usb/Usb_Interface_Descriptor.java
schlaepfer 27bfb3683f - structural changes (Device as instance)
git-svn-id: https://svn.code.sf.net/p/libusbjava/code/trunk@100 94ad28fe-ef68-46b1-9651-e7ae4fcf1c4c
2006-02-17 17:04:04 +00:00

48 lines
1.4 KiB
Java

package ch.ntb.usb;
public class Usb_Interface_Descriptor {
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();
}
}