Interface UsbEndpoint
public interface UsbEndpoint
USB endpoint.
Instances of this class describe a USB endpoint.
-
Method Summary
Modifier and TypeMethodDescriptionGets the direction of the endpoint.intGets the USB endpoint number.intGets the packet size.Gets the USB endpoint transfer type.
-
Method Details
-
getNumber
int getNumber()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
-
getDirection
UsbDirection getDirection()Gets the direction of the endpoint.This information is derived from the direction bit of the
bEndpointAddressfield in the endpoint descriptor.- Returns:
- the direction
-
getTransferType
-
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.
-