Kconfig 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. menu "USB-OTG"
  2. visible if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  3. # Invisible item, enabled when USB_OTG peripheral does exist
  4. config USB_OTG_SUPPORTED
  5. bool
  6. default y if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  7. config USB_HOST_CONTROL_TRANSFER_MAX_SIZE
  8. depends on USB_OTG_SUPPORTED
  9. int "Largest size (in bytes) of transfers to/from default endpoints"
  10. default 256
  11. help
  12. Each USB device attached is allocated a dedicated buffer for its OUT/IN transfers to/from the device's
  13. control endpoint. The maximum size of that buffer is determined by this option. The limited size of the
  14. transfer buffer have the following implications:
  15. - The maximum length of control transfers is limited
  16. - Device's with configuration descriptors larger than this limit cannot be supported
  17. choice USB_HOST_HW_BUFFER_BIAS
  18. depends on USB_OTG_SUPPORTED
  19. prompt "Hardware FIFO size biasing"
  20. default USB_HOST_HW_BUFFER_BIAS_BALANCED
  21. help
  22. The underlying hardware has size adjustable FIFOs to cache USB packets on reception (IN) or for
  23. transmission (OUT). The size of these FIFOs will affect the largest MPS (maximum packet size) and the
  24. maximum number of packets that can be cached at any one time. The hardware contains the following
  25. FIFOS: RX (for all IN packets), Non-periodic TX (for Bulk and Control OUT packets), and Periodic TX
  26. (for Interrupt and Isochronous OUT packets). This configuration option allows biasing the FIFO sizes
  27. towards a particular use case, which may be necessary for devices that have endpoints with large MPS.
  28. The MPS limits for each biasing are listed below:
  29. Balanced:
  30. - IN (all transfer types), 408 bytes
  31. - OUT non-periodic (Bulk/Control), 192 bytes (i.e., 3 x 64 byte packets)
  32. - OUT periodic (Interrupt/Isochronous), 192 bytes
  33. Bias IN:
  34. - IN (all transfer types), 600 bytes
  35. - OUT non-periodic (Bulk/Control), 64 bytes (i.e., 1 x 64 byte packets)
  36. - OUT periodic (Interrupt/Isochronous), 128 bytes
  37. Bias Periodic OUT:
  38. - IN (all transfer types), 128 bytes
  39. - OUT non-periodic (Bulk/Control), 64 bytes (i.e., 1 x 64 byte packets)
  40. - OUT periodic (Interrupt/Isochronous), 600 bytes
  41. config USB_HOST_HW_BUFFER_BIAS_BALANCED
  42. bool "Balanced"
  43. config USB_HOST_HW_BUFFER_BIAS_IN
  44. bool "Bias IN"
  45. config USB_HOST_HW_BUFFER_BIAS_PERIODIC_OUT
  46. bool "Periodic OUT"
  47. endchoice
  48. endmenu #USB-OTG