Skip to content

Update Arduino as ESP-IDF documentation: How to use USBHID classes with ESP32-S2 and ESP32-S3 #7214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/source/esp-idf_component.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,21 @@ Installation

.. note:: If you use Arduino with ESP-IDF often, you can place the arduino folder into global components folder.

If you're targeting the ESP32-S2 or ESP32-S3 and you want to use USBHID classes such as ``USBHID``, ``USBHIDConsumerControl``, ``USBHIDGamepad``, ``USBHIDKeyboard``, ``USBHIDMouse``, ``USBHIDSystemControl``, or ``USBHIDVendor``:

1. Clone these nested repos somewhere:

.. code-block:: bash

git clone https://github.com/espressif/esp32-arduino-lib-builder.git esp32-arduino-lib-builder && \
git clone https://github.com/hathach/tinyusb.git esp32-arduino-lib-builder/components/arduino_tinyusb/tinyusb

2. In the project folder, edit ``CMakeLists.txt`` and add the following before the ``project()`` line:

.. code-block:: bash

set(EXTRA_COMPONENT_DIRS <path to esp32-arduino-lib-builder/components/arduino_tinyusb>)

Configuration
-------------

Expand Down