Closed maxgerhardt closed 2 years ago
I also had this error on ESP32 S3. It would not compile on the Arduino IDE.
Adafruit TinyUSB Library/src/arduino/webusb/Adafruit_USBD_WebUSB.cpp:151:3: error: 'USB' was not declared in this scope
Adding "USB.h"
to Adafruit_USBD_WebUSB.cpp apparently fixed the issue.
Something I forgot to mention, Arduino did compile for the ESP32_S2 without that line of code added. After adding "USB.h" it still compiles for the S2, so, all good I guess. Thanks a lot for all.
oh, I see it is probably inconsistent include path for S2, S3. All good
oh, I see it is probably inconsistent include path for S2, S3. All good
Thank you for all.
Trying to use this library (
master
version) with the Arduino-ESP32 2.0.4 stable core release givesBecause the
extern ESPUSB USB;
is only inUSB.h
which doesn't get auto-included byArduino.h
, an explicit#include "USB.h"
should be made.Test project: Use https://github.com/maxgerhardt/pio-esp32s3-tinyusb but in the
platformio.ini
, instead of the link to my fork, use the main repo, and it will error out.Sidenote:
HardwareSerial.h
configurably includesUSB.h
, but only#if ARDUINO_USB_CDC_ON_BOOT
(source), so inclusion is not always guaranteed in all configurations.Also adds an ESP32S3 board to the CI.