0

Compiling conflicts with Adafruit Lib files. (At least it se
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Compiling conflicts with Adafruit Lib files. (At least it se

by jim_lee on Wed Jan 09, 2019 3:56 am

Decided to update my Adafruit libraries. This is compiling on a Teensy 3.2 running a 1/5" OLED.

Code: Select all | TOGGLE FULL SIZE
In file included from /Users/Dads/Documents/Arduino/libraries/Adafruit-SSD1351/Adafruit_SSD1351.h:33:0,
                 from /Users/Dads/Documents/Arduino/libraries/LC_screen/adafruit_1431_Obj.h:3,
                 from /Users/Dads/Documents/Arduino/mp3Player/mp3Player.ino:2:
/Users/Dads/Documents/Arduino/libraries/Adafruit-GFX/Adafruit_SPITFT.h:40:29: error: conflicting declaration 'typedef volatile uint32_t RwReg'
   typedef volatile uint32_t RwReg;
                             ^
In file included from /Users/Dads/Documents/Arduino/mp3Player/mp3Player.ino:1:0:
/Users/Dads/Documents/Arduino/libraries/Adafruit_VS1053_Library/Adafruit_VS1053.h:41:28: note: previous declaration as 'typedef volatile uint8_t RwReg'
   typedef volatile uint8_t RwReg;


The issue is pointing at this #def block..

Code: Select all | TOGGLE FULL SIZE
#if defined(__AVR__)
  typedef volatile uint8_t RwReg;
#elif defined(ARDUINO_STM32_FEATHER)
  typedef volatile uint32 RwReg;
  #undef USE_FAST_PINIO
  typedef class HardwareSPI SPIClass;
#elif defined(__OPENCR__) || defined (__OPENCM904__)
  #undef USE_FAST_PINIO
#elif defined(ARDUINO_FEATHER52) || defined(__arm__)
  typedef volatile uint32_t RwReg;                      << --- This is line 40
#elif defined(ESP32) || defined(ESP8266)
  typedef volatile uint32_t RwReg;
  #undef USE_FAST_PINIO
#else
  #undef USE_FAST_PINIO
#endif


Sigh.. Any ideas?

I think all these files are new..

-jim lee

jim_lee
 
Posts: 503
Joined: Thu May 24, 2012 8:24 pm

Re: Compiling conflicts with Adafruit Lib files. (At least i

by jim_lee on Wed Jan 09, 2019 8:03 pm

Quick fix.

I just bracketed the definition (at about line 40) in both files like this..

Code: Select all | TOGGLE FULL SIZE
#ifndef RwReg
typedef volatile uint32_t RwReg;
#endif


And away we go.

Yes its a hack, but it got the bus back on the road for now.

-jim lee

jim_lee
 
Posts: 503
Joined: Thu May 24, 2012 8:24 pm

Please be positive and constructive with your questions and comments.