Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compatibility with Arduino UNO R4 Wifi board #95

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

motazEmad
Copy link

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

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

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

2. 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));
faced compilation errors when compiling the library with Arduino R4 Uno Wifi:

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

2. 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));
@Pythagolix
Copy link

Pythagolix commented Dec 27, 2023

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants