Interface USBEndpoint


public interface USBEndpoint
USB endpoint.

Instances of this class describe a USB endpoint.

  • Method Details

    • number

      int number()
      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
    • direction

      USBDirection direction()
      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
    • transferType

      USBTransferType transferType()
      Gets the USB endpoint transfer type.
      Returns:
      the transfer type
    • packetSize

      int packetSize()
      Gets the packet size.

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

      Returns:
      the packet size, in bytes.