diff --git a/docs/docs_not_updated/esp32p4.txt b/docs/docs_not_updated/esp32p4.txt index 3a616e8140..a043f58448 100644 --- a/docs/docs_not_updated/esp32p4.txt +++ b/docs/docs_not_updated/esp32p4.txt @@ -10,7 +10,6 @@ api-guides/current-consumption-measurement-modules.rst api-guides/wifi-security.rst api-reference/peripherals/adc_continuous.rst api-reference/peripherals/adc_oneshot.rst -api-reference/peripherals/usb_host.rst api-reference/peripherals/touch_element.rst api-reference/peripherals/touch_pad.rst api-reference/peripherals/adc_calibration.rst diff --git a/docs/en/api-reference/peripherals/usb_host.rst b/docs/en/api-reference/peripherals/usb_host.rst index ea30d2f507..63b98e3790 100644 --- a/docs/en/api-reference/peripherals/usb_host.rst +++ b/docs/en/api-reference/peripherals/usb_host.rst @@ -25,18 +25,26 @@ Features & Limitations The Host Library has the following features: -- Supports Full Speed (FS) and Low Speed (LS) Devices. -- Supports all four transfer types, i.e., Control, Bulk, Interrupt, and Isochronous. -- Allows multiple class drivers to run simultaneously, i.e., multiple clients of the Host Library. -- A single device can be used by multiple clients simultaneously, e.g., composite devices. -- The Host Library itself and the underlying Host Stack does not internally instantiate any OS tasks. The number of tasks is entirely controlled by how the Host Library interface is used. However, a general rule of thumb regarding the number of tasks is ``(the number of host class drivers running + 1)``. +.. list:: + + :esp32s2 or esp32s3: - Supports Full Speed (FS) and Low Speed (LS) Devices. + :esp32p4: - Supports High Speed (HS), Full Speed (FS) and Low Speed (LS) Devices. + - Supports all four transfer types: Control, Bulk, Interrupt, and Isochronous. + :esp32p4: - Supports High-Bandwidth Isochronous endpoints. + - Allows multiple class drivers to run simultaneously, i.e., multiple clients of the Host Library. + - A single device can be used by multiple clients simultaneously, e.g., composite devices. + - The Host Library itself and the underlying Host Stack does not internally instantiate any OS tasks. The number of tasks is entirely controlled by how the Host Library interface is used. However, a general rule of thumb regarding the number of tasks is ``(the number of host class drivers running + 1)``. Currently, the Host Library and the underlying Host Stack has the following limitations: -- Only supports a single device, but the Host Library's API is designed for multiple device support. -- Only supports Asynchronous transfers. -- Only supports using the first configuration found. Changing to other configurations is not supported yet. -- Transfer timeouts are not supported yet. +.. list:: + + - Only supports a single device, but the Host Library's API is designed for multiple device support. + - Only supports Asynchronous transfers. + - Only supports using one configuration. Changing to other configurations after enumeration is not supported yet. + - Transfer timeouts are not supported yet. + :esp32p4: - {IDF_TARGET_NAME} contains two USB-OTG peripherals USB 2.0 OTG High-Speed and USB 2.0 OTG Full-Speed. Only the High-Speed instance is supported now. + :esp32p4: - {IDF_TARGET_NAME} cannot enumerate Low-Speed devices yet. .. -------------------------------------------------- Architecture ----------------------------------------------------- @@ -89,7 +97,7 @@ Therefore, in addition to the client tasks, the Host Library also requires a tas Devices ^^^^^^^ -The Host Library shields clients from the details of device handling, encompassing details such as connection, memory allocation, and enumeration. The clients are provided only with a list of already connected and enumerated devices to choose from. During enumeration, each device is automatically configured to use the first configuration found, namely, the first configuration descriptor returned on a Get Configuration Descriptor request. For most standard devices, the first configuration will have a ``bConfigurationValue`` of ``1``. +The Host Library shields clients from the details of device handling, encompassing details such as connection, memory allocation, and enumeration. The clients are provided only with a list of already connected and enumerated devices to choose from. By default during enumeration, each device is automatically configured to use the first configuration found, namely, the first configuration descriptor returned on a Get Configuration Descriptor request. For most standard devices, the first configuration will have a ``bConfigurationValue`` of ``1``. If option :ref:`CONFIG_USB_HOST_ENABLE_ENUM_FILTER_CALLBACK` is enabled, a different ``bConfigurationValue`` can be selected, see `Multiple configuration Support`_ for more details. It is possible for two or more clients to simultaneously communicate with the same device as long as they are not communicating to the same interface. However, multiple clients can simultaneously communicate with the same device's default endpoint (i.e., EP0), which will result in their control transfers being serialized. diff --git a/docs/zh_CN/api-reference/peripherals/usb_host.rst b/docs/zh_CN/api-reference/peripherals/usb_host.rst index 967f107630..632dc91d69 100644 --- a/docs/zh_CN/api-reference/peripherals/usb_host.rst +++ b/docs/zh_CN/api-reference/peripherals/usb_host.rst @@ -25,18 +25,26 @@ USB 主机库(以下简称主机库)是 USB 主机栈的最底层,提供 主机库具有以下特性: -- 支持全速 (FS) 和低速 (LS) 设备。 -- 支持四种传输类型,即控制传输、块传输、中断传输和同步传输。 -- 支持多个 Class 驱动程序同时运行,即主机的多个客户端同时运行。 -- 单个设备可以由多个客户端同时使用,如复合设备。 -- 主机库及其底层主机栈不会在内部自动创建操作系统任务,任务数量完全由主机库接口的使用方式决定。一般来说,任务数量为 ``(运行中的主机 Class 驱动程序数量 + 1)``。 +.. list:: + + :esp32s2 or esp32s3: - 支持全速 (FS) 和低速 (LS) 设备。 + :esp32p4: - 支持高速 (HS)、全速 (FS) 和低速 (LS) 设备。 + - 支持四种传输类型,即控制传输、块传输、中断传输和同步传输。 + :esp32p4: - 支持高带宽等时性端点。 + - 支持多个 Class 驱动程序同时运行,即主机的多个客户端同时运行。 + - 单个设备可以由多个客户端同时使用,如复合设备。 + - 主机库及其底层主机栈不会在内部自动创建操作系统任务,任务数量完全由主机库接口的使用方式决定。一般来说,任务数量为 ``(运行中的主机 Class 驱动程序数量 + 1)``。 目前,主机库及其底层主机栈存在以下限制: -- 仅支持单个设备,而主机库的 API 支持多设备。 -- 仅支持异步传输。 -- 仅支持使用发现的首个配置,尚不支持变更为其他配置。 -- 尚不支持传输超时。 +.. list:: + + - 仅支持单个设备,而主机库的 API 支持多设备。 + - 仅支持异步传输。 + - 仅支持使用发现的首个配置,尚不支持变更为其他配置。 + - 尚不支持传输超时。 + :esp32p4: - {IDF_TARGET_NAME} 包含两个 USB-OTG 外设:USB 2.0 OTG 高速和 USB 2.0 OTG 全速。目前仅支持高速实例。 + :esp32p4: - {IDF_TARGET_NAME} 目前无法枚举低速设备。 .. -------------------------------------------------- Architecture ----------------------------------------------------- @@ -89,7 +97,7 @@ USB 主机库(以下简称主机库)是 USB 主机栈的最底层,提供 设备 ^^^^^^^ -主机库隔离了客户端与设备处理的细节,包括连接、内存分配和枚举等,客户端只需提供已连接且已枚举的设备列表供选择。在枚举过程中,每个设备都会自动配置为使用找到的第一个配置,即通过获取配置描述符请求返回的第一个配置描述符。对于大多数标准设备,通常将第一个配置的 ``bConfigurationValue`` 设置为 ``1``。 +主机库隔离了客户端与设备处理的细节,包括连接、内存分配和枚举等,客户端只需提供已连接且已枚举的设备列表供选择。默认情况下,在枚举过程中,每个设备都会自动配置为使用找到的第一个配置,即通过获取配置描述符请求返回的第一个配置描述符。对于大多数标准设备,通常将第一个配置的 ``bConfigurationValue`` 设置为 ``1``。启用选项 :ref:`CONFIG_USB_HOST_ENABLE_ENUM_FILTER_CALLBACK` 后,可以选择不同的 ``bConfigurationValue``。获取更多详细信息,请参阅 `Multiple configuration Support_`。 只要不与相同接口通信,两个及以上的客户端可以同时与同一设备通信。然而,多个客户端同时与相同设备的默认端点(即 EP0)通信,将导致它们的控制传输序列化。