Jump to main content

##

# 2.2.3.2 USB_DEVICE_ENDPOINT_QUEUE_DEPTH_COMBINED Macro

## C

    #define USB_DEVICE_ENDPOINT_QUEUE_DEPTH_COMBINED 2

## Summary

This configuration constant specifies the combined endpoint queue depth in a case where the endpoint read and endpoint write functions are used to implement a vendor USB device. This constant should be used in conjunction with the usb_device_endpoint_functions.c file.

This macro defines the number of entries in all IN and OUT endpoint queues in all instances of the USB Device Layer. This value can be obtained by adding up the endpoint read and write queue sizes of each USB Device Layer instance . In a simple single instance USB Device Layer, that requires only one read and one write endpoint with one buffer each, the USB_DEVICE_ENDPOINT_QUEUE_DEPTH_COMBINED macro can be set to 2. Consider a case with one Device Layer instance using 2 IN and 2 OUT endpoints, each requiring 2 buffers, this macro should be set to 8 (2 + 2 + 2 + 2).

## Remarks

This constant needs to be specified only if a Vendor USB Device is to be implemented and the usb_device_endpoint_functions.c file is included in the project. This constant does not have any effect on queues of other standard function drivers that are included in the USB device implementation.