mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-03 00:21:44 +01:00
Merge branch 'refactor/usb_device_driver' into 'master'
tiny_usb: support on esp32-s3 Closes IDF-3234 See merge request espressif/esp-idf!14293
This commit is contained in:
@@ -33,6 +33,6 @@ Peripherals API
|
||||
:esp32s2: Touch Element <touch_element>
|
||||
TWAI <twai>
|
||||
UART <uart>
|
||||
:SOC_USB_SUPPORTED: USB <usb>
|
||||
:SOC_USB_OTG_SUPPORTED: USB Device <usb_device>
|
||||
|
||||
Code examples for this API section are provided in the :example:`peripherals` directory of ESP-IDF examples.
|
||||
@@ -1,6 +1,9 @@
|
||||
|
||||
USB Driver
|
||||
==========
|
||||
USB Device Driver
|
||||
=================
|
||||
|
||||
{IDF_TARGET_USB_DP_GPIO_NUM:default="20"}
|
||||
{IDF_TARGET_USB_DM_GPIO_NUM:default="19"}
|
||||
|
||||
Overview
|
||||
--------
|
||||
@@ -21,12 +24,14 @@ Hardware USB Connection
|
||||
|
||||
- Any board with the {IDF_TARGET_NAME} chip with USB connectors or with exposed USB's D+ and D- (DATA+/DATA-) pins.
|
||||
|
||||
If the board has no USB connector but has the pins, connect pins directly to the host (e.g. with do-it-yourself cable from any USB connection cable). For example, connect GPIO19/20 to D-/D+ respectively for an ESP32-S2 board:
|
||||
If the board has no USB connector but has the pins, connect pins directly to the host (e.g. with do-it-yourself cable from any USB connection cable).
|
||||
|
||||
On {IDF_TARGET_NAME}, connect GPIO {IDF_TARGET_USB_DP_GPIO_NUM} and {IDF_TARGET_USB_DM_GPIO_NUM} to D+/D- respectively:
|
||||
|
||||
|
||||
.. figure:: ../../../_static/usb-board-connection.png
|
||||
:align: center
|
||||
:alt: Connection of a board to a host ESP32-S2
|
||||
:alt: Connection of a board to a host ESP chip
|
||||
:figclass: align-center
|
||||
|
||||
Driver Structure
|
||||
@@ -25,8 +25,8 @@ Ring Buffers
|
||||
The ESP-IDF FreeRTOS ring buffer is a strictly FIFO buffer that supports arbitrarily sized items.
|
||||
Ring buffers are a more memory efficient alternative to FreeRTOS queues in situations where the
|
||||
size of items is variable. The capacity of a ring buffer is not measured by the number of items
|
||||
it can store, but rather by the amount of memory used for storing items. The ring buffer provides API
|
||||
to send an item, or to allocate space for an item in the ring buffer to be filled manually by the user.
|
||||
it can store, but rather by the amount of memory used for storing items. The ring buffer provides API
|
||||
to send an item, or to allocate space for an item in the ring buffer to be filled manually by the user.
|
||||
For efficiency reasons,
|
||||
**items are always retrieved from the ring buffer by reference**. As a result, all retrieved
|
||||
items *must also be returned* to the ring buffer by using :cpp:func:`vRingbufferReturnItem` or :cpp:func:`vRingbufferReturnItemFromISR`, in order for them to be removed from the ring buffer completely.
|
||||
@@ -531,6 +531,6 @@ Hooks API Reference
|
||||
Component Specific Properties
|
||||
-----------------------------
|
||||
|
||||
Besides standart component variables that could be gotten with basic cmake build properties FreeRTOS component also provides an arguments (only one so far) for simpler integration with other modules:
|
||||
Besides standard component variables that could be gotten with basic cmake build properties FreeRTOS component also provides an arguments (only one so far) for simpler integration with other modules:
|
||||
|
||||
- `ORIG_INCLUDE_PATH` - contains an absolute path to freertos root include folder. Thus instead of `#include "freertos/FreeRTOS.h"` you can refer to headers directly: `#include "FreeRTOS.h"`.
|
||||
|
||||
Reference in New Issue
Block a user