adafruit / Adafruit-SSD1351-library

Adafruit library for the 1.27" and 1.5" color OLEDs in the shop
http://www.adafruit.com/products/1431
Other
112 stars 50 forks source link

Can't build with ESP8266 #6

Closed shiitakeo closed 5 years ago

shiitakeo commented 9 years ago

The following error message appears.


In file included from test.ino:45:0: /Applications/Arduino.app/Contents/Java/libraries/Adafruit-SSD1351-library/Adafruit_SSD1351.h:22:0: warning: "swap" redefined [enabled by default]

define swap(a, b) { uint16_t t = a; a = b; b = t; }

^ In file included from test.ino:44:0: /Applications/Arduino.app/Contents/Java/libraries/Adafruit-GFX-Library/Adafruit_GFX.h:11:0: note: this is the location of the previous definition

define swap(a, b) { int16_t t = a; a = b; b = t; }

^ test.ino: In function 'void setup()': test.ino:99:390: warning: deprecated conversion from string constant to 'char_' [-Wwrite-strings] test.ino: In function 'void lcdTestPattern()': test.ino:332:49: warning: large integer implicitly truncated to unsigned type [-Woverflow] test.ino:335:54: warning: large integer implicitly truncated to unsigned type [-Woverflow] test.ino:337:64: warning: large integer implicitly truncated to unsigned type [-Woverflow] test.ino:338:62: warning: large integer implicitly truncated to unsigned type [-Woverflow] test.ino:340:68: warning: large integer implicitly truncated to unsigned type [-Woverflow] test.ino:344:28: warning: large integer implicitly truncated to unsigned type [-Woverflow] In file included from /Applications/Arduino.app/Contents/Java/libraries/Adafruit-SSD1351-library/Adafruit_SSD1351.cpp:21:0: /Applications/Arduino.app/Contents/Java/libraries/Adafruit-SSD1351-library/Adafruit_SSD1351.h:22:0: warning: "swap" redefined [enabled by default]

define swap(a, b) { uint16_t t = a; a = b; b = t; }

^ In file included from /Applications/Arduino.app/Contents/Java/libraries/Adafruit-SSD1351-library/Adafruit_SSD1351.cpp:20:0: /Applications/Arduino.app/Contents/Java/libraries/Adafruit-GFX-Library/Adafruit_GFX.h:11:0: note: this is the location of the previous definition

define swap(a, b) { int16_t t = a; a = b; b = t; }

^ /Applications/Arduino.app/Contents/Java/libraries/Adafruit-SSD1351-library/Adafruit_SSD1351.cpp: In constructor 'Adafruit_SSD1351::Adafruit_SSD1351(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t)': /Applications/Arduino.app/Contents/Java/libraries/Adafruit-SSD1351-library/Adafruit_SSD1351.cpp:465:17: error: cannot convert 'volatile uint32t {aka volatile unsigned int}' to 'PortReg {aka volatile unsigned char_}' in assignment csport = portOutputRegister(digitalPinToPort(cs)); ^ /Applications/Arduino.app/Contents/Java/libraries/Adafruit-SSD1351-library/Adafruit_SSD1351.cpp:468:17: error: cannot convert 'volatile uint32t {aka volatile unsigned int}' to 'PortReg {aka volatile unsigned char_}' in assignment rsport = portOutputRegister(digitalPinToPort(rs)); ^ /Applications/Arduino.app/Contents/Java/libraries/Adafruit-SSD1351-library/Adafruit_SSD1351.cpp:471:18: error: cannot convert 'volatile uint32t {aka volatile unsigned int}' to 'PortReg {aka volatile unsigned char_}' in assignment sidport = portOutputRegister(digitalPinToPort(sid)); ^ /Applications/Arduino.app/Contents/Java/libraries/Adafruit-SSD1351-library/Adafruit_SSD1351.cpp:474:19: error: cannot convert 'volatile uint32t {aka volatile unsigned int}' to 'PortReg {aka volatile unsigned char_}' in assignment sclkport = portOutputRegister(digitalPinToPort(sclk)); ^ /Applications/Arduino.app/Contents/Java/libraries/Adafruit-SSD1351-library/Adafruit_SSD1351.cpp: In constructor 'Adafruit_SSD1351::Adafruit_SSD1351(uint8_t, uint8_t, uint8_t)': /Applications/Arduino.app/Contents/Java/libraries/Adafruit-SSD1351-library/Adafruit_SSD1351.cpp:486:17: error: cannot convert 'volatile uint32t {aka volatile unsigned int}' to 'PortReg {aka volatile unsigned char_}' in assignment csport = portOutputRegister(digitalPinToPort(cs)); ^ /Applications/Arduino.app/Contents/Java/libraries/Adafruit-SSD1351-library/Adafruit_SSD1351.cpp:489:17: error: cannot convert 'volatile uint32t {aka volatile unsigned int}' to 'PortReg {aka volatile unsigned char*}' in assignment rsport = portOutputRegister(digitalPinToPort(rs)); ^

ladyada commented 5 years ago

hiya, this library has been refactored and should work just fine with ESP8266