Skip to content

Commit 555cf21

Browse files
Merge pull request #430 from espressif/docs/usb_max_transfer_size
docs(host): Add note about max transfer size
2 parents fbbd7bb + 3dfe7bf commit 555cf21

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

host/usb/include/usb/usb_host.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,11 @@ esp_err_t usb_host_endpoint_clear(usb_device_handle_t dev_hdl, uint8_t bEndpoint
662662
* - A transfer object can be re-used indefinitely
663663
* - A transfer can be submitted using usb_host_transfer_submit() or usb_host_transfer_submit_control()
664664
*
665+
* @note Maximum transfer size depends on hardware configuration and endpoint bMaxPacketSize, thus it is not checked on allocation.
666+
* Maximum transfer size is determined as follows:
667+
* - ESP32-S2, S3, H4, P4-OTG1.1 and P4-OTG2.0 revision < 3 = MIN(65535, 127 * bMaxPacketSize)
668+
* - ESP32-P4-OTG2.0 revision >= 3 = MIN(524287, 1023 * bMaxPacketSize)
669+
*
665670
* @param[in] data_buffer_size Size of the transfer's data buffer
666671
* @param[in] num_isoc_packets Number of isochronous packets in transfer (set to 0 for non-isochronous transfers)
667672
* @param[out] transfer Transfer object

0 commit comments

Comments
 (0)