zircothc / DRUM_2004_V1

ESP32 DRUM SYNTH MACHINE
280 stars 7 forks source link

Error compiling to enable midi #7

Open SKALOVSK opened 2 months ago

SKALOVSK commented 2 months ago

** Good evening, I'm trying to activate midi in the code but every time I compile it gives me the error below: Without activating midi I can compile it normally

Arduino: 1.8.19 (Windows 10), Placa:"LOLIN S2 Mini, Enabled, Disabled, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), None, Disabled"

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:120:10: error: 'usbd_class_driver_t' {aka 'const struct '} has no member named 'name'

     .name             = DRIVER_NAME("CDC"),

      ^~~~

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:122:10: error: 'usbd_class_driver_t' {aka 'const struct '} has no member named 'deinit'; did you mean 'init'?

     .deinit           = cdcd_deinit,

      ^~~~~~

      init

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:122:29: error: 'cdcd_deinit' undeclared here (not in a function); did you mean 'dcd_deinit'?

     .deinit           = cdcd_deinit,

                         ^~~~~~~~~~~

                         dcd_deinit

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:133:10: error: 'usbd_class_driver_t' {aka 'const struct '} has no member named 'name'

     .name             = DRIVER_NAME("MSC"),

      ^~~~

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:135:10: error: 'usbd_class_driver_t' {aka 'const struct '} has no member named 'deinit'; did you mean 'init'?

     .deinit           = NULL,

      ^~~~~~

      init

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:146:10: error: 'usbd_class_driver_t' {aka 'const struct '} has no member named 'name'

     .name             = DRIVER_NAME("HID"),

      ^~~~

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:148:10: error: 'usbd_class_driver_t' {aka 'const struct '} has no member named 'deinit'; did you mean 'init'?

     .deinit           = hidd_deinit,

      ^~~~~~

      init

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:148:29: error: 'hidd_deinit' undeclared here (not in a function); did you mean 'hidd_init'?

     .deinit           = hidd_deinit,

                         ^~~~~~~~~~~

                         hidd_init

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:172:10: error: 'usbd_class_driver_t' {aka 'const struct '} has no member named 'name'

     .name             = DRIVER_NAME("VIDEO"),

      ^~~~

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:174:10: error: 'usbd_class_driver_t' {aka 'const struct '} has no member named 'deinit'; did you mean 'init'?

     .deinit           = videod_deinit,

      ^~~~~~

      init

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:174:29: error: 'videod_deinit' undeclared here (not in a function); did you mean 'videod_init'?

     .deinit           = videod_deinit,

                         ^~~~~~~~~~~~~

                         videod_init

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:185:10: error: 'usbd_class_driver_t' {aka 'const struct '} has no member named 'name'

     .name             = DRIVER_NAME("MIDI"),

      ^~~~

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:187:10: error: 'usbd_class_driver_t' {aka 'const struct '} has no member named 'deinit'; did you mean 'init'?

     .deinit           = midid_deinit,

      ^~~~~~

      init

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:187:29: error: 'midid_deinit' undeclared here (not in a function); did you mean 'midid_init'?

     .deinit           = midid_deinit,

                         ^~~~~~~~~~~~

                         midid_init

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:198:10: error: 'usbd_class_driver_t' {aka 'const struct '} has no member named 'name'

     .name             = DRIVER_NAME("VENDOR"),

      ^~~~

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:200:10: error: 'usbd_class_driver_t' {aka 'const struct '} has no member named 'deinit'; did you mean 'init'?

     .deinit           = vendord_deinit,

      ^~~~~~

      init

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:200:29: error: 'vendord_deinit' undeclared here (not in a function); did you mean 'vendord_init'?

     .deinit           = vendord_deinit,

                         ^~~~~~~~~~~~~~

                         vendord_init

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:224:10: error: 'usbd_class_driver_t' {aka 'const struct '} has no member named 'name'

     .name             = DRIVER_NAME("DFU-RUNTIME"),

      ^~~~

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:226:10: error: 'usbd_class_driver_t' {aka 'const struct '} has no member named 'deinit'; did you mean 'init'?

     .deinit           = dfu_rtd_deinit,

      ^~~~~~

      init

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:226:29: error: 'dfu_rtd_deinit' undeclared here (not in a function); did you mean 'dfu_rtd_init'?

     .deinit           = dfu_rtd_deinit,

                         ^~~~~~~~~~~~~~

                         dfu_rtd_init

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:237:10: error: 'usbd_class_driver_t' {aka 'const struct '} has no member named 'name'

     .name             = DRIVER_NAME("DFU"),

      ^~~~

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:239:10: error: 'usbd_class_driver_t' {aka 'const struct '} has no member named 'deinit'; did you mean 'init'?

     .deinit           = dfu_moded_deinit,

      ^~~~~~

      init

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:239:29: error: 'dfu_moded_deinit' undeclared here (not in a function); did you mean 'dfu_moded_init'?

     .deinit           = dfu_moded_deinit,

                         ^~~~~~~~~~~~~~~~

                         dfu_moded_init

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c: In function 'tud_sof_cb_enable':

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:405:33: error: 'SOF_CONSUMER_USER' undeclared (first use in this function)

usbd_sof_enable(_usbd_rhport, SOF_CONSUMER_USER, en);

                             ^~~~~~~~~~~~~~~~~

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:405:33: note: each undeclared identifier is reported only once for each function it appears in

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:405:3: error: too many arguments to function 'usbd_sof_enable'

usbd_sof_enable(_usbd_rhport, SOF_CONSUMER_USER, en);

^~~~~~~

In file included from C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:41:

C:\Users\user\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.17/tools/sdk/esp32s2/include/arduino_tinyusb/tinyusb/src/device/usbd_pvt.h:113:6: note: declared here

void usbd_sof_enable(uint8_t rhport, bool en);

  ^~~~~~~~~~~~~~~

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c: In function 'tud_deinit':

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:473:26: error: 'usbd_class_driver_t' {aka 'const struct '} has no member named 'deinit'; did you mean 'init'?

 if(driver && driver->deinit) {

                      ^~~~~~

                      init

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:475:15: error: 'usbd_class_driver_t' {aka 'const struct '} has no member named 'deinit'; did you mean 'init'?

   driver->deinit();

           ^~~~~~

           init

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:475:7: error: called object is not a function or function pointer

   driver->deinit();

   ^~~~~~

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c: In function 'tud_task_ext':

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:638:49: error: 'SOF_CONSUMER_USER' undeclared (first use in this function)

     if (tu_bit_test(_usbd_dev.sof_consumer, SOF_CONSUMER_USER)) {

                                             ^~~~~~~~~~~~~~~~~

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c: In function 'dcd_event_handler':

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:1200:47: error: 'SOF_CONSUMER_USER' undeclared (first use in this function)

   if (tu_bit_test(_usbd_dev.sof_consumer, SOF_CONSUMER_USER)) {

                                           ^~~~~~~~~~~~~~~~~

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c: At top level:

C:\Users\user\Documents\Arduino\libraries\Adafruit_TinyUSB_Library\src\device\usbd.c:1440:38: error: unknown type name 'sof_consumer_t'

void usbd_sof_enable(uint8_t rhport, sof_consumer_t consumer, bool en) {

                                  ^~~~~~~~~~~~~~

exit status 1

Erro compilando para a placa LOLIN S2 Mini

zircothc commented 2 months ago

Hi I did some work to get USB midi but audio got a lot of noise that come from PC USB so I did not try it anymore. I will run some test. ;)

SKALOVSK commented 2 months ago

Cool, I managed to activate Midi using the adafruit 3.1.3 library, I'll do some more grounding tests here to reduce the noise.

SKALOVSK commented 2 months ago

I managed to activate Midi and talk to Ableton, but it has a lot of lag, I'm trying to find out the reason, but apparently it sends data for no reason...