I am compiling some code on a Bluefruit that, for some reason, runs into a compile error during capacitive sensing initialization in my code. #including Adafruit_CircuitPlayground.h works just fine in the Circuit Playground demo example code. The demo code includes Adafruit_CircuitPlayground.h just fine, but mine will fail to compile doing the same... thoughts?
I noticed this in Adafruit_CircuitPlayground.h...
Code: Select all
#if defined(__AVR__) || \
defined(ARDUINO_NRF52840_CIRCUITPLAY) // Circuit Playground 'classic'
#include "utility/CPlay_CapacitiveSensor.h"
#else
#include "utility/Adafruit_CPlay_FreeTouch.h"
#include "utility/IRLibCPE.h"
#endif
Code: Select all
#if defined(ARDUINO_NRF52840_CIRCUITPLAY)
#define RwReg uint32_t
#elif defined(__AVR__)
typedef volatile uint8_t RwReg;
#endif
Code: Select all
In file included from c:\Users\georg\Documents\Arduino\libraries\Adafruit_Circuit_Playground/Adafruit_Circuit_Playground.h:30,
from c:\Users\georg\Documents\Arduino\libraries\Adafruit_Circuit_Playground/Adafruit_CircuitPlayground.h:3,
from C:\Users\georg\Documents\Arduino\bf helmet\bf helmet.ino:5:
c:\Users\georg\Documents\Arduino\libraries\Adafruit_Circuit_Playground/utility/CPlay_CapacitiveSensor.h:23:15: error: conflicting declaration 'typedef volatile uint32_t uint32_t'
23 | #define RwReg uint32_t
| ^~~~~~~~
c:\Users\georg\Documents\Arduino\libraries\FastLED\src/platforms/arm/nrf52/led_sysdefs_arm_nrf52.h:44:23: note: in expansion of macro 'RwReg'
44 | typedef __IO uint32_t RwReg;
| ^~~~~
In file included from c:\users\georg\appdata\local\arduino15\packages\adafruit\tools\arm-none-eabi-gcc\9-2019q4\arm-none-eabi\include\stdint.h:14,
from c:\users\georg\appdata\local\arduino15\packages\adafruit\tools\arm-none-eabi-gcc\9-2019q4\lib\gcc\arm-none-eabi\9.2.1\include\stdint.h:9,
from C:\Users\georg\AppData\Local\Arduino15\packages\adafruit\hardware\nrf52\1.3.0\cores\nRF5/Arduino.h:5,
from C:\Users\georg\AppData\Local\Temp\arduino-sketch-254EED3067344A96DCC012BC5D98BB79\sketch\bf helmet.ino.cpp:1:
c:\users\georg\appdata\local\arduino15\packages\adafruit\tools\arm-none-eabi-gcc\9-2019q4\arm-none-eabi\include\sys\_stdint.h:48:20: note: previous declaration as 'typedef __uint32_t uint32_t'
48 | typedef __uint32_t uint32_t ;
| ^~~~~~~~
exit status 1
Compilation error: exit status 1