Interface UsbAlternateInterface


public interface UsbAlternateInterface
USB alternate interface setting.

Instances of this class describe an alternate setting of a USB interface.

  • Method Details

    • getNumber

      int getNumber()
      Gets the alternate setting number.

      It is equal to the bAlternateSetting field of the interface descriptor.

      Returns:
      the alternate setting number
    • getClassCode

      int getClassCode()
      Gets the interface class.

      Interface classes are defined by the USB standard.

      Returns:
      the interface class
    • getSubclassCode

      int getSubclassCode()
      Gets the interface subclass.

      Interface subclasses are defined by the USB standard.

      Returns:
      the interface subclass
    • getProtocolCode

      int getProtocolCode()
      Gets the interface protocol.

      Interface protocols are defined by the USB standard.

      Returns:
      the interface protocol
    • getEndpoints

      @NotNull @NotNull @Unmodifiable List<UsbEndpoint> getEndpoints()
      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.

      The returned list is sorted by endpoint number.

      Returns:
      a list of endpoints.
    • getEndpoint

      @NotNull @NotNull UsbEndpoint getEndpoint(int endpointNumber, UsbDirection direction)
      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
      Throws:
      UsbException - if the endpoint does not exist