
net.codecrete.usb.UsbEndpoint Maven / Gradle / Ivy
//
// Java Does USB
// Copyright (c) 2022 Manuel Bleichenbacher
// Licensed under MIT License
// https://opensource.org/licenses/MIT
//
package net.codecrete.usb;
/**
* USB endpoint.
*
* Instances of this class describe a USB endpoint.
*
*/
public interface UsbEndpoint {
/**
* Gets the USB endpoint number.
*
* It is extracted from the {@code 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
* {@link UsbDevice} instance.
*
*
* @return the endpoint number
*/
int getNumber();
/**
* Gets the direction of the endpoint.
*
* This information is derived from the direction bit of the
* {@code bEndpointAddress} field in the endpoint descriptor.
*
*
* @return the direction
*/
UsbDirection getDirection();
/**
* Gets the USB endpoint transfer type.
*
* @return the transfer type
*/
UsbTransferType getTransferType();
/**
* Gets the packet size.
*
* USB data transfer is divided into packets. This value
* indicates the maximum packet size.
*
*
* @return the packet size, in bytes.
*/
int getPacketSize();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy