---
title: "IOUSBGetEndpointDirection(_:)"
framework: iousbhost
role: symbol
role_heading: Function
path: "iousbhost/iousbgetendpointdirection(_:)"
---

# IOUSBGetEndpointDirection(_:)

Obtains the direction of an endpoint from an endpoint descriptor.

## Declaration

```swift
func IOUSBGetEndpointDirection(_ descriptor: UnsafePointer<IOUSBEndpointDescriptor>!) -> UInt8
```

## Parameters

- `descriptor`: An endpoint descriptor to parse. Control endpoints return doc://com.apple.documentation/documentation/kernel/tiousbendpointdirection/kiousbendpointdirectionunknown.

## Return Value

Return Value The endpoint descriptor indicating the direction.

## Discussion

Discussion This method parses an endpoint descriptor to determine its transfer direction.

## See Also

### Endpoint Descriptor Parsing

- [IOUSBGetNextEndpointDescriptor(_:_:_:)](iousbhost/iousbgetnextendpointdescriptor(_:_:_:).md)
- [IOUSBGetEndpointAddress(_:)](iousbhost/iousbgetendpointaddress(_:).md)
- [IOUSBGetEndpointNumber(_:)](iousbhost/iousbgetendpointnumber(_:).md)
- [IOUSBGetEndpointType(_:)](iousbhost/iousbgetendpointtype(_:).md)
- [IOUSBGetEndpointMaxPacketSize(_:_:)](iousbhost/iousbgetendpointmaxpacketsize(_:_:).md)
- [IOUSBGetEndpointIntervalEncodedMicroframes(_:_:)](iousbhost/iousbgetendpointintervalencodedmicroframes(_:_:).md)
- [IOUSBGetEndpointIntervalMicroframes(_:_:)](iousbhost/iousbgetendpointintervalmicroframes(_:_:).md)
- [IOUSBGetEndpointIntervalFrames(_:_:)](iousbhost/iousbgetendpointintervalframes(_:_:).md)
- [IOUSBGetEndpointMaxStreamsEncoded(_:_:_:)](iousbhost/iousbgetendpointmaxstreamsencoded(_:_:_:).md)
- [IOUSBGetEndpointMaxStreams(_:_:_:)](iousbhost/iousbgetendpointmaxstreams(_:_:_:).md)
