adafruit / Adafruit_VS1053_Library

This is a Arduino library for the Adafruit VS1053 Codec Breakout and Music Maker Shields
https://www.adafruit.com/products/1381
133 stars 112 forks source link

Compiler error when using a Arduino Nano Every (ATMega4809) #70

Closed wraith-ethz closed 4 years ago

wraith-ethz commented 4 years ago

I use a Arduino Nano Every with the ATMega4809 micro controller. By using the Example "feather_player", there are following compiler errors in the file 'Adafruit_VS1053.cpp':

ladyada commented 4 years ago

not surprising, you'll have to update this line https://github.com/adafruit/Adafruit_VS1053_Library/blob/master/Adafruit_VS1053.cpp#L50 to check that it isnt a nano every

@facchinm whats the recommended #ifdef way of doing that?

facchinm commented 4 years ago

@ladyada ARDUINO_ARCH_AVR is fine to avoid compiling for 4809 (since the official core adds ARDUINO_ARCH_MEGAAVR macro). For compatibility with third party cores, #ifdef OCR0A should work better than anything else :wink:

wraith-ethz commented 4 years ago

@facchinm I checked, and I was using the version 1.0.8 from the Arduino library manager. When I use the master branch library, it compiles now :) I have now two questions;

  1. does the VS1053 library support the Arduino Nano Every or other ATMega AVRs? I will defiantly test it soon, but maybe you know this already?
  2. will you release the current branch as V1.0.9, so that the fix will be in the official Arduino Library?

Thanks in advance

ladyada commented 4 years ago

hmm not sure why it has not been bumped - will check the process that manages that, it will get released this week for sure