Added in API level 12

UsbEndpoint


open class UsbEndpoint : Parcelable
kotlin.Any
   ↳ android.hardware.usb.UsbEndpoint

A class representing an endpoint on a UsbInterface. Endpoints are the channels for sending and receiving data over USB. Typically bulk endpoints are used for sending non-trivial amounts of data. Interrupt endpoints are used for sending small amounts of data, typically events, separately from the main data streams. The endpoint zero is a special endpoint for control messages sent from the host to device. Isochronous endpoints are currently unsupported.

Summary

Inherited constants
Public methods
open Int

open Int

Returns the endpoint's address field.

open Int

Returns the endpoint's attributes field.

open Int

Returns the endpoint's direction.

open Int

Extracts the endpoint's endpoint number from its address

open Int

Returns the endpoint's interval field.

open Int

Returns the endpoint's maximum packet size.

open Int

Returns the endpoint's type.

open String

open Unit
writeToParcel(parcel: Parcel, flags: Int)

Properties
static Parcelable.Creator<UsbEndpoint!>

Public methods

describeContents

Added in API level 12
open fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

getAddress

Added in API level 12
open fun getAddress(): Int

Returns the endpoint's address field. The address is a bitfield containing both the endpoint number as well as the data direction of the endpoint. the endpoint number and direction can also be accessed via getEndpointNumber and getDirection.

Return
Int the endpoint's address

getAttributes

Added in API level 12
open fun getAttributes(): Int

Returns the endpoint's attributes field.

Return
Int the endpoint's attributes

getDirection

Added in API level 12
open fun getDirection(): Int

Returns the endpoint's direction. Returns UsbConstants.USB_DIR_OUT if the direction is host to device, and UsbConstants.USB_DIR_IN if the direction is device to host.

Return
Int the endpoint's direction

getEndpointNumber

Added in API level 12
open fun getEndpointNumber(): Int

Extracts the endpoint's endpoint number from its address

Return
Int the endpoint's endpoint number

getInterval

Added in API level 12
open fun getInterval(): Int

Returns the endpoint's interval field.

Return
Int the endpoint's interval

getMaxPacketSize

Added in API level 12
open fun getMaxPacketSize(): Int

Returns the endpoint's maximum packet size.

Return
Int the endpoint's maximum packet size

getType

Added in API level 12
open fun getType(): Int

Returns the endpoint's type. Possible results are:

Return
Int the endpoint's type

toString

Added in API level 12
open fun toString(): String
Return
String a string representation of the object.

writeToParcel

Added in API level 12
open fun writeToParcel(
    parcel: Parcel,
    flags: Int
): Unit
Parameters
dest The Parcel in which the object should be written. This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 12
static val CREATOR: Parcelable.Creator<UsbEndpoint!>