Expand Minimize

USBD_CalculateUsbBandwidth routine

The USBD_CalculateUsbBandwidth routine has been deprecated in Windows XP and later operating systems. Do not use.

Syntax


ULONG USBD_CalculateUsbBandwidth(
  _In_  ULONG MaxPacketSize,
  _In_  UCHAR EndpointType,
  _In_  BOOLEAN LowSpeed
);

Parameters

MaxPacketSize [in]

Specifies the maximum packet size.

EndpointType [in]

Contains a value of type USBD_PIPE_TYPE that specifies the pipe type.

LowSpeed [in]

Indicates, when TRUE, that the device is a low speed device. When FALSE, this member indicates that the device is a hi-speed device.

Return value

The USBD_CalculateUsbBandwidth routine returns zero for bulk and control endpoints and the bandwidth consumed in bits per millisecond. returns for all other endpoints.

Remarks

The USBD_CalculateUsbBandwidth routine approximates the bandwidth using the following procedure. First, USBD_CalculateUsbBandwidth adds the largest possible packet size, specified in MaxPacketSize, to the overhead associated with the type of end point specified in EndpointType. Next, USBD_CalculateUsbBandwidth multiplies this sum by 8 to convert the units from bytes per millisecond into bits per millisecond. Finally, USBD_CalculateUsbBandwidth multiplies this quantity by 7/6 to account for filler bits. In a worst case scenario, there will be one bit of filler data stuffed into the data stream for every six bits of data. USBD_CalculateUsbBandwidth uses worst-case assumptions to calculate the bandwidth required by the pipe.

Requirements

Version

Deprecated.

Header

Usbdlib.h (include Usbdlib.h)

Library

Usbd.lib

IRQL

<=DISPATCH_LEVEL

See also

USBD_PIPE_TYPE
Routines for USB Client Drivers

 

 

Send comments about this topic to Microsoft

Build date: 12/5/2013

Show:
© 2014 Microsoft. All rights reserved.