Merge branch 'feature/usb_host_docs' into 'master'
Add USB Host Library API docs See merge request espressif/esp-idf!15013
This commit is contained in:
@@ -49,6 +49,7 @@ LEGACY_DOCS = ['api-guides/build-system-legacy.rst',
|
||||
'get-started-legacy/**']
|
||||
|
||||
USB_DOCS = ['api-reference/peripherals/usb_device.rst',
|
||||
'api-reference/peripherals/usb_host.rst',
|
||||
'api-guides/usb-otg-console.rst',
|
||||
'api-guides/dfu.rst']
|
||||
|
||||
|
||||
@@ -14,4 +14,8 @@ INPUT += \
|
||||
$(PROJECT_PATH)/components/touch_element/include/touch_element/touch_element.h \
|
||||
$(PROJECT_PATH)/components/touch_element/include/touch_element/touch_button.h \
|
||||
$(PROJECT_PATH)/components/touch_element/include/touch_element/touch_slider.h \
|
||||
$(PROJECT_PATH)/components/touch_element/include/touch_element/touch_matrix.h
|
||||
$(PROJECT_PATH)/components/touch_element/include/touch_element/touch_matrix.h \
|
||||
$(PROJECT_PATH)/components/usb/include/usb/usb_helpers.h \
|
||||
$(PROJECT_PATH)/components/usb/include/usb/usb_host.h \
|
||||
$(PROJECT_PATH)/components/usb/include/usb/usb_types_ch9.h \
|
||||
$(PROJECT_PATH)/components/usb/include/usb/usb_types_stack.h
|
||||
|
||||
@@ -6,4 +6,8 @@ INPUT += \
|
||||
$(PROJECT_PATH)/components/hal/include/hal/pcnt_types.h \
|
||||
$(PROJECT_PATH)/components/driver/include/driver/pcnt.h \
|
||||
$(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/touch_sensor_channel.h \
|
||||
$(PROJECT_PATH)/components/driver/$(IDF_TARGET)/include/driver/touch_sensor.h
|
||||
$(PROJECT_PATH)/components/driver/$(IDF_TARGET)/include/driver/touch_sensor.h \
|
||||
$(PROJECT_PATH)/components/usb/include/usb/usb_helpers.h \
|
||||
$(PROJECT_PATH)/components/usb/include/usb/usb_host.h \
|
||||
$(PROJECT_PATH)/components/usb/include/usb/usb_types_ch9.h \
|
||||
$(PROJECT_PATH)/components/usb/include/usb/usb_types_stack.h
|
||||
|
||||
@@ -34,5 +34,6 @@ Peripherals API
|
||||
TWAI <twai>
|
||||
UART <uart>
|
||||
:SOC_USB_OTG_SUPPORTED: USB Device <usb_device>
|
||||
:SOC_USB_OTG_SUPPORTED: USB Host <usb_host>
|
||||
|
||||
Code examples for this API section are provided in the :example:`peripherals` directory of ESP-IDF examples.
|
||||
26
docs/en/api-reference/peripherals/usb_host.rst
Normal file
26
docs/en/api-reference/peripherals/usb_host.rst
Normal file
@@ -0,0 +1,26 @@
|
||||
USB Host
|
||||
========
|
||||
|
||||
.. warning::
|
||||
The USB Host Library API is a beta version thus is subject to change.
|
||||
|
||||
The following document lists the API and types of the USB Host Library (that is currently under development).
|
||||
|
||||
API Reference
|
||||
-------------
|
||||
|
||||
The API of the USB Host Library is separated into the following header files. However, it is sufficient for applications to only ``#include "usb/usb_host.h"`` and all of USB Host Library headers will also be included.
|
||||
|
||||
- :component_file:`usb/include/usb/usb_host.h` contains the functions and types of the USB Host Library
|
||||
- :component_file:`usb/include/usb/usb_helpers.h` contains various helper functions that are related to the USB protocol such as descriptor parsing.
|
||||
- :component_file:`usb/include/usb/usb_types_stack.h` contains types that are are used across multiple layers of the USB Host stack.
|
||||
- :component_file:`usb/include/usb/usb_types_ch9.h` contains types and macros related to Chapter 9 of the USB2.0 specification (i.e., descriptors and standard requests).
|
||||
|
||||
|
||||
.. include-build-file:: inc/usb_host.inc
|
||||
|
||||
.. include-build-file:: inc/usb_helpers.inc
|
||||
|
||||
.. include-build-file:: inc/usb_types_stack.inc
|
||||
|
||||
.. include-build-file:: inc/usb_types_ch9.inc
|
||||
@@ -33,6 +33,7 @@
|
||||
:esp32s2: Touch Element <touch_element>
|
||||
TWAI <twai>
|
||||
UART <uart>
|
||||
:SOC_USB_OTG_SUPPORTED: USB Device <usb_device>
|
||||
:SOC_USB_OTG_SUPPORTED: USB 设备 (Device) <usb_device>
|
||||
:SOC_USB_OTG_SUPPORTED: USB 主机 (Host) <usb_host>
|
||||
|
||||
本部分的 API 示例代码存放在 ESP-IDF 示例项目的 :example:`peripherals` 目录下。
|
||||
1
docs/zh_CN/api-reference/peripherals/usb_host.rst
Normal file
1
docs/zh_CN/api-reference/peripherals/usb_host.rst
Normal file
@@ -0,0 +1 @@
|
||||
.. include:: ../../../en/api-reference/peripherals/usb_host.rst
|
||||
Reference in New Issue
Block a user