public interface USBAlternateInterface
USB alternate interface setting.
Instances of this class describe an alternate setting of a USB interface.
-
Method Summary
Modifier and TypeMethodDescriptionintGets the interface class.Gets the endpoints of this alternate interface settings.getEndpoint(int endpointNumber, USBDirection direction) Gets the endpoint with the specified number and direction.intnumber()Gets the alternate setting number.intGets the interface protocol.intGets the interface subclass.
-
Method Details
-
number
int number()Gets the alternate setting number.It is equal to the
bAlternateSettingfield of the interface descriptor.- Returns:
- the alternate setting number
-
classCode
int classCode()Gets the interface class.Interface classes are defined by the USB standard.
- Returns:
- the interface class
-
subclassCode
int subclassCode()Gets the interface subclass.Interface subclasses are defined by the USB standard.
- Returns:
- the interface subclass
-
protocolCode
int protocolCode()Gets the interface protocol.Interface protocols are defined by the USB standard.
- Returns:
- the interface protocol
-
endpoints
List<USBEndpoint> endpoints()Gets the endpoints of this alternate interface settings.The endpoint list does not include endpoint 0, which is always available and reserved for control transfers.
- Returns:
- a list of endpoints.
-
getEndpoint
Gets the endpoint with the specified number and direction.- Parameters:
endpointNumber- endpoint number (in the range between 1 and 127, without the direction bit)direction- endpoint direction- Returns:
- the endpoint, or
nullif no endpoint with the given number and direction exists
-