Interface UsbEndpoint


public interface UsbEndpoint
USB endpoint.

Instances of this class describe a USB endpoint.

  • Method Details

    • getNumber

      int getNumber()
      Gets the USB endpoint number.

      It is extracted from the bEndpointAddress field in the endpoint descriptor. The value is in the range 1 to 127 and does not include the bit indicating the direction.

      Use this number when calling any of the transfer methods of a UsbDevice instance.

      Returns:
      the endpoint number
    • getDirection

      UsbDirection getDirection()
      Gets the direction of the endpoint.

      This information is derived from the direction bit of the bEndpointAddress field in the endpoint descriptor.

      Returns:
      the direction
    • getTransferType

      UsbTransferType getTransferType()
      Gets the USB endpoint transfer type.
      Returns:
      the transfer type
    • getPacketSize

      int getPacketSize()
      Gets the packet size.

      USB data transfer is divided into packets. This value indicates the maximum packet size.

      Returns:
      the packet size, in bytes.