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

compatibility with Arduino UNO R4 Wifi board #95

Open motazEmad opened 9 months ago

motazEmad commented 9 months ago

faced compilation errors when compiling the library with Arduino R4 Uno Wifi:

  1. Adafruit_VS1053.h
    fatal error: wiring_private.h: No such file or directory
    #include "wiring_private.h"

    I have seen that it was fixed in another library, I did the same fix in this

2.Adafruit_VS1053.cpp

Arduino.h:75:92: error: cannot convert 'volatile uint16_t* {aka volatile short unsigned int*}' to 'PortReg* {aka volatile long unsigned int*}' in assignment
 #define portOutputRegister(port)    &(((R_PORT0_Type *)IOPORT_PRV_PORT_ADDRESS(port))->PODR)

Adafruit_VS1053.cpp:332:16: note: in expansion of macro 'portOutputRegister'
   clkportreg = portOutputRegister(digitalPinToPort(_clk));

used pinMode Function instead of portOutputRegister & portInputRegister

Pythagolix commented 9 months ago

It's not compiling with minima. Same problem #2.

Arduino/libraries/Adafruit_VS1053_Library/Adafruit_VS1053.cpp: In constructor 'Adafruit_VS1053::Adafruit_VS1053(int8_t, int8_t, int8_t, int8_t, int8_t, int8_t, int8_t)': /Library/Arduino15/packages/arduino/hardware/renesas_uno/1.0.5/cores/arduino/Arduino.h:75:92: error: cannot convert 'volatile uint16_t {aka volatile short unsigned int}' to 'PortReg {aka volatile long unsigned int}' in assignment

define portOutputRegister(port) &(((R_PORT0_Type *)IOPORT_PRV_PORT_ADDRESS(port))->PODR)

etc...