<!--
{
  "availability" : [
    "macCatalyst: 14.0.0 -",
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "IOUSBHost",
  "identifier" : "/documentation/IOUSBHost/IOUSBGetEndpointDirection(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "IOUSBHost"
    ],
    "preciseIdentifier" : "c:@F@IOUSBGetEndpointDirection"
  },
  "title" : "IOUSBGetEndpointDirection(_:)"
}
-->

# IOUSBGetEndpointDirection(_:)

Obtains the direction of an endpoint from an endpoint descriptor.

```
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

The endpoint descriptor indicating the direction.

## Discussion

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)