Hello,
i am trying to use the SCL3300 library (MEMS sensor) with the PortentaH7.
The sensor is controlled via SPI. The library can be compiled and loaded correctly for other boards like the Uno or Arduino Mega2560. With the Portenta M7 or M4 I unfortunately get a longer error message when compiling. It is probably about the CRC calculation. Could it be an overlap in the namespace because of the library or does someone else have similar errors with the CRC calculation ?
I post the error message here too, maybe someone has some ideas. Otherwise I will program the library myself from the beginning.
Hope it is maybe an easy fix. Thanks.
Arduino: 1.8.13 (Windows 10), Board: "Arduino Portenta H7 (M7 core)"
In file included from C:\Users\jh\AppData\Local\Arduino15\packages\arduino-beta\hardware\mbed\1.2.2\cores\arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/CMSIS/stm32h7xx.h:129:0,
from C:\Users\jh\AppData\Local\Arduino15\packages\arduino-beta\hardware\mbed\1.2.2\cores\arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/cmsis.h:21,
from C:\Users\jh\AppData\Local\Arduino15\packages\arduino-beta\hardware\mbed\1.2.2\cores\arduino/mbed/targets/TARGET_STM/PinNamesTypes.h:33,
from C:\Users\jh\AppData\Local\Arduino15\packages\arduino-beta\hardware\mbed\1.2.2\variants\PORTENTA_H7_M7/pinmode_arduino.h:24,
from C:\Users\jh\AppData\Local\Arduino15\packages\arduino-beta\hardware\mbed\1.2.2\cores\arduino/Arduino.h:29,
from sketch\Example1_BasicTiltLevelOffset.ino.cpp:1:
C:\Users\jh\AppData\Local\Arduino15\packages\arduino-beta\hardware\mbed\1.2.2\cores\arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/CMSIS/stm32h747xx.h:2598:43: error: expected ')' before '*' token
#define CRC ((CRC_TypeDef *) CRC_BASE)
^
C:\Users\jh\Documents\Arduino\libraries\SCL3300\src/SCL3300.h:146:18: note: in expansion of macro 'CRC'
uint8_t CMD, CRC;
^
C:\Users\jh\AppData\Local\Arduino15\packages\arduino-beta\hardware\mbed\1.2.2\cores\arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/CMSIS/stm32h747xx.h:2598:43: error: expected ')' before '*' token
#define CRC ((CRC_TypeDef *) CRC_BASE)
^
C:\Users\jh\Documents\Arduino\libraries\SCL3300\src/SCL3300.h:146:18: note: in expansion of macro 'CRC'
uint8_t CMD, CRC;
Rest in attachment.
error.txt (14.4 KB)