- 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,44 @@
package ch.ntb.usb;
public class Usb_Config_Descriptor {
public static final int USB_MAXCONFIG = 8;
public byte bLength;
public byte bDescriptorType;
public short wTotalLength;
public byte bNumInterfaces;
public byte bConfigurationValue;
public byte iConfiguration;
public byte bmAttributes;
public byte MaxPower;
public Usb_Interface[] interface_;
// TODO: Extra descriptors are not interpreted because of their unknown
// structure
public Usb_Config_Descriptor extra; /* Extra descriptors */
public int extralen;
public String toString() {
StringBuffer sb = new StringBuffer();
sb.append("** Usb_Config_Descriptor **\n");
sb.append("\tblenght: " + bLength + "\n");
sb.append("\tbDescriptorType: " + bDescriptorType + "\n");
sb.append("\tbNumInterfaces: " + bNumInterfaces + "\n");
sb.append("\tbConfigurationValue: " + bConfigurationValue + "\n");
sb.append("\tiConfiguration: " + iConfiguration + "\n");
sb.append("\tbmAttributes: 0x"
+ Integer.toHexString(bmAttributes & 0xFF) + "\n");
sb.append("\tMaxPower [mA]: " + MaxPower + "\n");
return sb.toString();
}
}