---
title: IOUSBGetEndpointMaxPacketSize
framework: usbdriverkit
role: symbol
role_heading: Function
path: usbdriverkit/iousbgetendpointmaxpacketsize
---

# IOUSBGetEndpointMaxPacketSize

Extracts the maximum packet size from an endpoint descriptor.

## Declaration

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

## Parameters

- `usbDeviceSpeed`: The operational speed of the device.
- `descriptor`: The descriptor to parse.

## Return Value

Return Value The maximum packet size in bytes.

## Discussion

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

## See Also

### Endpoint Descriptors

- [IOUSBGetNextEndpointDescriptor](usbdriverkit/iousbgetnextendpointdescriptor.md)
- [IOUSBGetEndpointAddress](usbdriverkit/iousbgetendpointaddress.md)
- [IOUSBGetEndpointBurstSize](usbdriverkit/iousbgetendpointburstsize.md)
- [IOUSBGetEndpointDirection](usbdriverkit/iousbgetendpointdirection.md)
- [IOUSBGetEndpointIntervalEncodedMicroframes](usbdriverkit/iousbgetendpointintervalencodedmicroframes.md)
- [IOUSBGetEndpointIntervalFrames](usbdriverkit/iousbgetendpointintervalframes.md)
- [IOUSBGetEndpointIntervalMicroframes](usbdriverkit/iousbgetendpointintervalmicroframes.md)
- [IOUSBGetEndpointMaxStreams](usbdriverkit/iousbgetendpointmaxstreams.md)
- [IOUSBGetEndpointMaxStreamsEncoded](usbdriverkit/iousbgetendpointmaxstreamsencoded.md)
- [IOUSBGetEndpointMult](usbdriverkit/iousbgetendpointmult.md)
- [IOUSBGetEndpointNumber](usbdriverkit/iousbgetendpointnumber.md)
- [IOUSBGetEndpointType](usbdriverkit/iousbgetendpointtype.md)
