|
求问一下,我现在有一个Ra8876_Lite芯片的显示屏ER-TFTM101-1-4125,厂家提供了libraries文件,但导入后练examples都没办法运行,求问有没有朋友用过这个库的啊?这个库是本身有问题还是要做什么特别的设置吗?谢谢!错误代码如下
- Arduino:1.8.13 (Windows 10), 开发板:"Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"
- In file included from C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:4:0:
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite/Ra8876_Lite.h:13:21: warning: extra tokens at end of #ifndef directive
- #ifndef _RA8876_LITE.H
- ^
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite/Ra8876_Lite.h:14:21: warning: ISO C++11 requires whitespace after the macro name
- #define _RA8876_LITE.H
- ^
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:10:69: warning: narrowing conversion of '166' from 'int' to 'char' inside { } [-Wnarrowing]
- char string1[] = {0xa6,0xb0,0xa4,0xe9,0xaa,0x46,0xa4,0xe8,stringEnd}; //BIG5
- ^
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:10:69: warning: narrowing conversion of '176' from 'int' to 'char' inside { } [-Wnarrowing]
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:10:69: warning: narrowing conversion of '164' from 'int' to 'char' inside { } [-Wnarrowing]
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:10:69: warning: narrowing conversion of '233' from 'int' to 'char' inside { } [-Wnarrowing]
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:10:69: warning: narrowing conversion of '170' from 'int' to 'char' inside { } [-Wnarrowing]
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:10:69: warning: narrowing conversion of '164' from 'int' to 'char' inside { } [-Wnarrowing]
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:10:69: warning: narrowing conversion of '232' from 'int' to 'char' inside { } [-Wnarrowing]
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:11:69: warning: narrowing conversion of '187' from 'int' to 'char' inside { } [-Wnarrowing]
- char string2[] = {0xbb,0xb6,0xd3,0xad,0xca,0xb9,0xd3,0xc3,stringEnd}; //BG2312
- ^
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:11:69: warning: narrowing conversion of '182' from 'int' to 'char' inside { } [-Wnarrowing]
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:11:69: warning: narrowing conversion of '211' from 'int' to 'char' inside { } [-Wnarrowing]
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:11:69: warning: narrowing conversion of '173' from 'int' to 'char' inside { } [-Wnarrowing]
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:11:69: warning: narrowing conversion of '202' from 'int' to 'char' inside { } [-Wnarrowing]
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:11:69: warning: narrowing conversion of '185' from 'int' to 'char' inside { } [-Wnarrowing]
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:11:69: warning: narrowing conversion of '211' from 'int' to 'char' inside { } [-Wnarrowing]
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:11:69: warning: narrowing conversion of '195' from 'int' to 'char' inside { } [-Wnarrowing]
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino: In function 'void loop()':
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:48:75: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
- ra8876lite.putString(10,0,"Show internal font 8x16 www.buydisplay.com");
- ^
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:53:76: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
- ra8876lite.putString(10,26,"Show internal font 12x24 www.buydisplay.com");
- ^
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:58:75: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
- ra8876lite.putString(10,60,"Show internal font 16x32 www.buydisplay.com");
- ^
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:63:48: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
- ra8876lite.putString(10,102,"font enlarge x2");
- ^
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:68:48: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
- ra8876lite.putString(10,144,"font enlarge x3");
- ^
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:73:48: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
- ra8876lite.putString(10,202,"font enlarge x4");
- ^
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:81:60: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
- ra8876lite.putString(10,276,"show external GT font 16x16");
- ^
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:86:76: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
- ra8876lite.putString(10,302,"show external GT font 24x24 with Arial font");
- ^
- In file included from C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:10:0:
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.h:13:21: warning: extra tokens at end of #ifndef directive
- #ifndef _RA8876_LITE.H
- ^
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.h:14:21: warning: ISO C++11 requires whitespace after the macro name
- #define _RA8876_LITE.H
- ^
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp: In member function 'boolean Ra8876_Lite::begin()':
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:25:19: error: no matching function for call to 'SPIClass::begin(int&)'
- SPI.begin(_xnscs);
- ^
- In file included from C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:9:0:
- C:\Users\wuliaaa\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.4\libraries\SPI\src/SPI.h:159:15: note: candidate: static void SPIClass::begin()
- static void begin();
- ^~~~~
- C:\Users\wuliaaa\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.4\libraries\SPI\src/SPI.h:159:15: note: candidate expects 0 arguments, 1 provided
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:28:32: error: no matching function for call to 'SPIClass::setClockDivider(int&, int)'
- SPI.setClockDivider(_xnscs,21);
- ^
- In file included from C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:9:0:
- C:\Users\wuliaaa\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.4\libraries\SPI\src/SPI.h:302:22: note: candidate: static void SPIClass::setClockDivider(uint8_t)
- inline static void setClockDivider(uint8_t clockDiv) {
- ^~~~~~~~~~~~~~~
- C:\Users\wuliaaa\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.4\libraries\SPI\src/SPI.h:302:22: note: candidate expects 1 argument, 2 provided
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:29:35: error: no matching function for call to 'SPIClass::setDataMode(int&, int)'
- SPI.setDataMode(_xnscs,SPI_MODE0);
- ^
- In file included from C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:9:0:
- C:\Users\wuliaaa\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.4\libraries\SPI\src/SPI.h:297:22: note: candidate: static void SPIClass::setDataMode(uint8_t)
- inline static void setDataMode(uint8_t dataMode) {
- ^~~~~~~~~~~
- C:\Users\wuliaaa\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.4\libraries\SPI\src/SPI.h:297:22: note: candidate expects 1 argument, 2 provided
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:62:31: error: no matching function for call to 'SPIClass::setClockDivider(int&, int)'
- SPI.setClockDivider(_xnscs,2);
- ^
- In file included from C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:9:0:
- C:\Users\wuliaaa\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.4\libraries\SPI\src/SPI.h:302:22: note: candidate: static void SPIClass::setClockDivider(uint8_t)
- inline static void setClockDivider(uint8_t clockDiv) {
- ^~~~~~~~~~~~~~~
- C:\Users\wuliaaa\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.4\libraries\SPI\src/SPI.h:302:22: note: candidate expects 1 argument, 2 provided
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp: In member function 'void Ra8876_Lite::lcdRegWrite(ru8)':
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:129:43: error: 'SPI_CONTINUE' was not declared in this scope
- SPI.transfer(_xnscs,RA8876_SPI_CMDWRITE,SPI_CONTINUE);
- ^~~~~~~~~~~~
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:130:16: warning: invalid conversion from 'int' to 'void*' [-fpermissive]
- SPI.transfer(_xnscs,reg);
- ^~~~~~
- In file included from C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:9:0:
- C:\Users\wuliaaa\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.4\libraries\SPI\src/SPI.h:244:22: note: initializing argument 1 of 'static void SPIClass::transfer(void*, size_t)'
- inline static void transfer(void *buf, size_t count) {
- ^~~~~~~~
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp: In member function 'void Ra8876_Lite::lcdDataWrite(ru8)':
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:136:44: error: 'SPI_CONTINUE' was not declared in this scope
- SPI.transfer(_xnscs,RA8876_SPI_DATAWRITE,SPI_CONTINUE);
- ^~~~~~~~~~~~
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:137:16: warning: invalid conversion from 'int' to 'void*' [-fpermissive]
- SPI.transfer(_xnscs,data);
- ^~~~~~
- In file included from C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:9:0:
- C:\Users\wuliaaa\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.4\libraries\SPI\src/SPI.h:244:22: note: initializing argument 1 of 'static void SPIClass::transfer(void*, size_t)'
- inline static void transfer(void *buf, size_t count) {
- ^~~~~~~~
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp: In member function 'ru8 Ra8876_Lite::lcdDataRead()':
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:143:43: error: 'SPI_CONTINUE' was not declared in this scope
- SPI.transfer(_xnscs,RA8876_SPI_DATAREAD,SPI_CONTINUE);
- ^~~~~~~~~~~~
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:144:27: warning: invalid conversion from 'int' to 'void*' [-fpermissive]
- ru8 data = SPI.transfer(_xnscs,0xff);
- ^~~~~~
- In file included from C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:9:0:
- C:\Users\wuliaaa\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.4\libraries\SPI\src/SPI.h:244:22: note: initializing argument 1 of 'static void SPIClass::transfer(void*, size_t)'
- inline static void transfer(void *buf, size_t count) {
- ^~~~~~~~
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:144:38: error: void value not ignored as it ought to be
- ru8 data = SPI.transfer(_xnscs,0xff);
- ^
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp: In member function 'ru8 Ra8876_Lite::lcdStatusRead()':
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:151:45: error: 'SPI_CONTINUE' was not declared in this scope
- SPI.transfer(_xnscs,RA8876_SPI_STATUSREAD,SPI_CONTINUE);
- ^~~~~~~~~~~~
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:152:26: warning: invalid conversion from 'int' to 'void*' [-fpermissive]
- ru8 data= SPI.transfer(_xnscs,0xff);
- ^~~~~~
- In file included from C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:9:0:
- C:\Users\wuliaaa\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.4\libraries\SPI\src/SPI.h:244:22: note: initializing argument 1 of 'static void SPIClass::transfer(void*, size_t)'
- inline static void transfer(void *buf, size_t count) {
- ^~~~~~~~
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:152:37: error: void value not ignored as it ought to be
- ru8 data= SPI.transfer(_xnscs,0xff);
- ^
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp: In member function 'void Ra8876_Lite::lcdDataWrite16bbp(ru16)':
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:175:44: error: 'SPI_CONTINUE' was not declared in this scope
- SPI.transfer(_xnscs,RA8876_SPI_DATAWRITE,SPI_CONTINUE);
- ^~~~~~~~~~~~
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:177:16: warning: invalid conversion from 'int' to 'void*' [-fpermissive]
- SPI.transfer(_xnscs,data>>8);
- ^~~~~~
- In file included from C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:9:0:
- C:\Users\wuliaaa\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.4\libraries\SPI\src/SPI.h:244:22: note: initializing argument 1 of 'static void SPIClass::transfer(void*, size_t)'
- inline static void transfer(void *buf, size_t count) {
- ^~~~~~~~
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp: In member function 'boolean Ra8876_Lite::ra8876SdramInitial()':
- C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:477:29: warning: integer overflow in expression [-Woverflow]
- Auto_Refresh=(64*DRAM_FREQ*1000)/(4096);
- ~~~~~~~~~~~~^~~~~
- exit status 1
- 为开发板 Arduino Mega or Mega 2560 编译时出错
复制代码
|
|