public interface USBEndpoint
USB endpoint.
Instances of this class describe a USB endpoint.
-
Method Summary
Modifier and TypeMethodDescriptionGets the direction of the endpoint.intnumber()Gets the USB endpoint number.intGets the packet size.Gets the USB endpoint transfer type.
-
Method Details
-
number
int number()Gets the USB endpoint number.It is extracted from the
bEndpointAddressfield 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
USBDeviceinstance.- Returns:
- the endpoint number
-
direction
USBDirection direction()Gets the direction of the endpoint.This information is derived from the direction bit of the
bEndpointAddressfield 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.
-