Conflict declaration with CP Bluefruit capacitive sensors??

Play with it! Please tell us which board you're using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
mrpibbtsa
 
Posts: 7
Joined: Thu May 27, 2021 12:12 pm

Conflict declaration with CP Bluefruit capacitive sensors??

Post by mrpibbtsa »

Hi there,

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
and this in CPlay_CapacitiveSensor.h (where the error occurs)

Code: Select all

#if defined(ARDUINO_NRF52840_CIRCUITPLAY)
#define RwReg uint32_t
#elif defined(__AVR__)
typedef volatile uint8_t RwReg;
#endif
My compiling errors...

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

User avatar
adafruit_support_carter
 
Posts: 29150
Joined: Tue Nov 29, 2016 2:45 pm

Re: Conflict declaration with CP Bluefruit capacitive sensors??

Post by adafruit_support_carter »

It looks like a conflict between the FastLED library and the Circuit Playground Library.

Are you using FastLED in your sketch?

Locked
Please be positive and constructive with your questions and comments.

Return to “Circuit Playground Classic, Circuit Playground Express, Circuit Playground Bluefruit”