chegewara / EspTinyUSB

ESP32S2 native USB library. Implemented few common classes, like MIDI, CDC, HID or DFU (update).
MIT License
475 stars 70 forks source link

In EspTinyUSB-2.0.0/src/device/msc/ #ifdef CFG_TUD_MSC should be #if CFG_TUD_MSC #61

Closed blekenbleu closed 2 years ago

blekenbleu commented 2 years ago

mscusb.cpp is ok, but flashdisk.cpp, ramdisk.cpp, and sdcard.cpp throw compile errors when CFG_TUD_MSC is set to 0 in hardware/espressif/esp32/tools/sdk/esp32s2/include/arduino_tinyusb/include/tusb_config.h

with Arduino 1.8.16

chegewara commented 2 years ago

Hi, in which version of this library? And what is arduino-esp32 version?

blekenbleu commented 2 years ago

Sorry, https://github.com/chegewara/EspTinyUSB/archive/refs/tags/2.0.0.zip today

and https://github.com/espressif/arduino-esp32 cloned:

commit b94b38c9d11f3c4a85ac3e18a9ec22132351716d Author: TANAKA Masayuki akiraneko@gmail.com Date: Wed Nov 10 00:01:21 2021 +0900

chegewara commented 2 years ago

Please try arduino-esp32 v2.0.1, which i tested with and this library master or v2.0.0. All MSC examples seem to build.

blekenbleu commented 2 years ago

Yes, they build when #define CFG_TUD_MSC OPT_MCU_ESP32S2 in hardware/espressif/esp32/tools/sdk/esp32s2/include/arduino_tinyusb/include/tusb_config.h

I wanted them to NOT build when #define CFG_TUD_MSC 0

chegewara commented 2 years ago

arduino-esp32 is with this flag always being 1 for esp32 S2. I dont see when you will have it 0, but feel free to make PR.

blekenbleu commented 2 years ago

I apologize for not following protocol.

chegewara commented 2 years ago

Nothing wrong happen.