1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
/*
* Java libusb wrapper
* Copyright (c) 2005-2006 Andreas Schlaepfer <spandi at users.sourceforge.net>
*
* http://libusbjava.sourceforge.net
* This library is covered by the LGPL, read LGPL.txt for details.
*/
package ch.ntb.usb;
/**
* Represents an USB interface.<br>
* An interface is a group of alternate settings of a configuration.<br>
*
*/
public class Usb_Interface {
/**
* Maximal number of alternate settings
*/
public static final int USB_MAXALTSETTING = 128; /* Hard limit */
private Usb_Interface_Descriptor[] altsetting;
private int num_altsetting;
@Override
public String toString() {
return "Usb_Interface num_altsetting: 0x"
+ Integer.toHexString(num_altsetting);
}
/**
* Retuns an array of interface descriptors.<br>
*
* @return an array of interface descriptors
*/
public Usb_Interface_Descriptor[] getAltsetting() {
return altsetting;
}
/**
* Returns the number of alternate settings.<br>
*
* @return the number of alternate settings
*/
public int getNumAltsetting() {
return num_altsetting;
}
}
|