From 17db1436cad8893b86179cafc8640071c65e8d05 Mon Sep 17 00:00:00 2001 From: RefactorFactory <108912458+RefactorFactory@users.noreply.github.com> Date: Fri, 2 Sep 2022 16:48:35 -0700 Subject: [PATCH] How to use USBHID classes with ESP32-S2 and ESP32-S3 These instructions are based on esp32-arduino-lib-builder's build process, including https://github.com/espressif/esp32-arduino-lib-builder/blob/master/tools/update-components.sh which explains how to clone tinyusb. --- docs/source/esp-idf_component.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/source/esp-idf_component.rst b/docs/source/esp-idf_component.rst index e2049b4e2bf..3a1e29f2457 100644 --- a/docs/source/esp-idf_component.rst +++ b/docs/source/esp-idf_component.rst @@ -37,6 +37,21 @@ Installation cd ../.. && \ idf.py menuconfig +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 ) + Configuration -------------