- descriptors extended from Usb_Descriptor

- toString()
- javadoc added
- interface changes (Strings, dll)

git-svn-id: https://svn.code.sf.net/p/libusbjava/code/trunk@147 94ad28fe-ef68-46b1-9651-e7ae4fcf1c4c
This commit is contained in:
schlaepfer
2006-05-10 13:15:33 +00:00
parent 5d69fa84bf
commit 2ae9ca02d7
10 changed files with 391 additions and 167 deletions

View File

@@ -1,17 +1,32 @@
package ch.ntb.usb;
/**
* Represents an USB interface.<br>
* An interface is a group of alternate settings of a configuration.<br>
*
* @author schlaepfer
*
*/
public class Usb_Interface {
/**
* Maximal number of alternate settings
*/
public static final int USB_MAXALTSETTING = 128; /* Hard limit */
/**
* Interface descriptors
*/
public Usb_Interface_Descriptor[] altsetting;
/**
* Number of alternate settings
*/
public int num_altsetting;
public String toString() {
StringBuffer sb = new StringBuffer();
sb.append("** Usb_Interface **\n");
sb.append("\tnum_altsetting: " + num_altsetting + "\n");
return sb.toString();
return "Usb_Interface num_altsetting: 0x"
+ Integer.toHexString(num_altsetting);
}
}