<!--
{
  "availability" : [
    "DriverKit: 19.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "USBDriverKit",
  "identifier" : "/documentation/USBDriverKit/IOUSBGetEndpointMaxPacketSize",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "USBDriverKit"
    ],
    "preciseIdentifier" : "c:@F@IOUSBGetEndpointMaxPacketSize"
  },
  "title" : "IOUSBGetEndpointMaxPacketSize"
}
-->

# IOUSBGetEndpointMaxPacketSize

Extracts the maximum packet size from an endpoint descriptor.

```
uint16_t IOUSBGetEndpointMaxPacketSize(uint32_t usbDeviceSpeed, const IOUSBEndpointDescriptor *descriptor);
```

## Parameters

`usbDeviceSpeed`

The operational speed of the device.

`descriptor`

The descriptor to parse.

## Return Value

The maximum packet size in bytes.

## Discussion

This method parses an endpoint descriptor to determine its maximum packet size, which doesn’t take into account mult or burst factors.

---

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)