adafruit / Adafruit_Protomatter

RGB matrix library for Arduino
57 stars 20 forks source link

Not compatible with esp32 version 3.0.0 #78

Open chockenberry opened 1 month ago

chockenberry commented 1 month ago

I recently updated to version 3.0.0 of Espressif's 'esp32' package (after being prompted to by the IDE).

When building Protomatter with this new version, I see the following errors:

In file included from /Users/CHOCK/Documents/Arduino/libraries/Adafruit_Protomatter/src/arch/arch.h:190,
                 from /Users/CHOCK/Documents/Arduino/libraries/Adafruit_Protomatter/src/core.c:33:
/Users/CHOCK/Documents/Arduino/libraries/Adafruit_Protomatter/src/arch/esp32-common.h: In function '_PM_esp32commonTimerInit':
/Users/CHOCK/Documents/Arduino/libraries/Adafruit_Protomatter/src/arch/esp32-common.h:92:19: error: too many arguments to function 'timerBegin'
   92 |     core->timer = timerBegin(_PM_timerNum, 2, true); // 1:2 prescale, count up
      |                   ^~~~~~~~~~
In file included from /Users/CHOCK/Library/Arduino15/packages/esp32/hardware/esp32/3.0.0/cores/esp32/esp32-hal.h:84,
                 from /Users/CHOCK/Library/Arduino15/packages/esp32/hardware/esp32/3.0.0/cores/esp32/Arduino.h:36,
                 from /Users/CHOCK/Documents/Arduino/libraries/Adafruit_Protomatter/src/arch/arch.h:166:
/Users/CHOCK/Library/Arduino15/packages/esp32/hardware/esp32/3.0.0/cores/esp32/esp32-hal-timer.h:35:13: note: declared here
   35 | hw_timer_t *timerBegin(uint32_t frequency);
      |             ^~~~~~~~~~
/Users/CHOCK/Documents/Arduino/libraries/Adafruit_Protomatter/src/arch/esp32-common.h:94:3: error: too many arguments to function 'timerAttachInterrupt'
   94 |   timerAttachInterrupt(timer, &_PM_esp32timerCallback, true);
      |   ^~~~~~~~~~~~~~~~~~~~
/Users/CHOCK/Library/Arduino15/packages/esp32/hardware/esp32/3.0.0/cores/esp32/esp32-hal-timer.h:50:6: note: declared here
   50 | void timerAttachInterrupt(hw_timer_t *timer, void (*userFunc)(void));
      |      ^~~~~~~~~~~~~~~~~~~~

exit status 1

The workaround is to go into the Boards Manager, find 'esp32', and downgrade to version 2.0.17.