- 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:
44
java/src/ch/ntb/usb/Usb_Config_Descriptor.java
Normal file
44
java/src/ch/ntb/usb/Usb_Config_Descriptor.java
Normal 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();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user