Skip to content

LedControl.h Compile error using Arduino Giga R1 #53

@Ca11isidrin

Description

@Ca11isidrin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions