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

LedControl.h Compile error using Arduino Giga R1 #53

Open
Ca11isidrin opened this issue Apr 7, 2024 · 0 comments
Open

LedControl.h Compile error using Arduino Giga R1 #53

Ca11isidrin opened this issue Apr 7, 2024 · 0 comments

Comments

@Ca11isidrin
Copy link

I used LCDemoMatrix.ino example which works great on a Mega 2560, but the project I'm working on uses the Giga R1, but when I try to compile the same sketch on the R1, I get errors on expansion of macro SPI_MOSI
see end for copy of error message.
I created a totally blank sketch containing only the following:

#include "LedControl.h" 
void setup(){ 
} 
void loop(){
}

even tried the <> round the LedControl.h and including Arduino.h into the LedControl.h file (as this seems to fix other issues in the past) but whatever I've tried it still returns the same error on compiling.

Is there anything I can try to rectify this ?
I'm assuming it down to the Giga being MBed so maybe the files need updating so this will work with the Giga.

Hoping you can help with this

Chris

ERROR MESSAGE
In file included from /Library/Arduino15/packages/arduino/hardware/mbed_giga/4.1.1/cores/arduino/Arduino.h:76:0,vfrom /private/var/folders/tb/rs678pkd0vj60ndbmk3l1b800000gn/T/arduino/sketches/3C0EF7E69088BCAD6968DD946D6405E4/sketch/sketch_apr7b.ino.cpp:1:
/Library/Arduino15/packages/arduino/hardware/mbed_giga/4.1.1/variants/GIGA/pins_arduino.h:175:23: error: expected identifier before '(' token
#define PIN_SPI_MOSI (90u)
^
/Library/Arduino15/packages/arduino/hardware/mbed_giga/4.1.1/variants/GIGA/pins_arduino.h:243:41: note: in expansion of macro 'PIN_SPI_MOSI'
#define SPI_MOSI (digitalPinToPinName(PIN_SPI_MOSI))
^~~~~~~~~~~~
/Documents/Arduino/libraries/LedControl/src/LedControl.h:72:13: note: in expansion of macro 'SPI_MOSI'
int SPI_MOSI;
^
/Library/Arduino15/packages/arduino/hardware/mbed_giga/4.1.1/variants/GIGA/pins_arduino.h:175:24: error: expected ')' before numeric constant
#define PIN_SPI_MOSI (90u)
^
/Library/Arduino15/packages/arduino/hardware/mbed_giga/4.1.1/variants/GIGA/pins_arduino.h:175:24: note: in definition of macro 'PIN_SPI_MOSI'
#define PIN_SPI_MOSI (90u)
^~~
/Documents/Arduino/libraries/LedControl/src/LedControl.h:72:13: note: in expansion of macro 'SPI_MOSI'
int SPI_MOSI;
^
/Library/Arduino15/packages/arduino/hardware/mbed_giga/4.1.1/variants/GIGA/pins_arduino.h:175:24: error: expected ')' before numeric constant
#define PIN_SPI_MOSI (90u)
^
/Library/Arduino15/packages/arduino/hardware/mbed_giga/4.1.1/variants/GIGA/pins_arduino.h:175:24: note: in definition of macro 'PIN_SPI_MOSI'
#define PIN_SPI_MOSI (90u)
^~~
/Documents/Arduino/libraries/LedControl/src/LedControl.h:72:13: note: in expansion of macro 'SPI_MOSI'
int SPI_MOSI;
^
/Library/Arduino15/packages/arduino/hardware/mbed_giga/4.1.1/variants/GIGA/pins_arduino.h:175:24: error: expected ')' before numeric constant
#define PIN_SPI_MOSI (90u)
^
/Library/Arduino15/packages/arduino/hardware/mbed_giga/4.1.1/variants/GIGA/pins_arduino.h:175:24: note: in definition of macro 'PIN_SPI_MOSI'
#define PIN_SPI_MOSI (90u)
^~~
/Documents/Arduino/libraries/LedControl/src/LedControl.h:72:13: note: in expansion of macro 'SPI_MOSI'
int SPI_MOSI;
^

exit status 1

Compilation error: exit status 1

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

No branches or pull requests

1 participant