RA8876_Lite芯片 运行库问题-Arduino中文社区 - Powered by Discuz!

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 428|回复: 0

[未解决] RA8876_Lite芯片 运行库问题

[复制链接]
回帖奖励 10 金币 回复本帖可获得 10 金币奖励! 每人限 1 次
发表于 2021-12-6 17:37 | 显示全部楼层 |阅读模式
求问一下,我现在有一个Ra8876_Lite芯片的显示屏ER-TFTM101-1-4125,厂家提供了libraries文件,但导入后练examples都没办法运行,求问有没有朋友用过这个库的啊?这个库是本身有问题还是要做什么特别的设置吗?谢谢!错误代码如下
  1. Arduino:1.8.13 (Windows 10), 开发板:"Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"





















  2. In file included from C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino:4:0:

  3. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite/Ra8876_Lite.h:13:21: warning: extra tokens at end of #ifndef directive

  4. #ifndef _RA8876_LITE.H

  5.                      ^

  6. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite/Ra8876_Lite.h:14:21: warning: ISO C++11 requires whitespace after the macro name

  7. #define _RA8876_LITE.H

  8.                      ^

  9. 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]

  10.   char string1[] = {0xa6,0xb0,0xa4,0xe9,0xaa,0x46,0xa4,0xe8,stringEnd};  //BIG5

  11.                                                                      ^

  12. 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]

  13. 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]

  14. 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]

  15. 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]

  16. 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]

  17. 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]

  18. 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]

  19.   char string2[] = {0xbb,0xb6,0xd3,0xad,0xca,0xb9,0xd3,0xc3,stringEnd};  //BG2312

  20.                                                                      ^

  21. 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]

  22. 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]

  23. 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]

  24. 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]

  25. 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]

  26. 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]

  27. 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]

  28. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\examples\RA8876_Lite_Text\RA8876_Lite_Text.ino: In function 'void loop()':

  29. 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]

  30.    ra8876lite.putString(10,0,"Show internal font 8x16   www.buydisplay.com");

  31.                                                                            ^

  32. 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]

  33.    ra8876lite.putString(10,26,"Show internal font 12x24  www.buydisplay.com");

  34.                                                                             ^

  35. 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]

  36.    ra8876lite.putString(10,60,"Show internal font 16x32 www.buydisplay.com");

  37.                                                                            ^

  38. 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]

  39.    ra8876lite.putString(10,102,"font enlarge x2");

  40.                                                 ^

  41. 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]

  42.    ra8876lite.putString(10,144,"font enlarge x3");

  43.                                                 ^

  44. 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]

  45.    ra8876lite.putString(10,202,"font enlarge x4");

  46.                                                 ^

  47. 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]

  48.    ra8876lite.putString(10,276,"show external GT font 16x16");

  49.                                                             ^

  50. 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]

  51.    ra8876lite.putString(10,302,"show external GT font 24x24 with Arial font");

  52.                                                                             ^

  53. In file included from C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:10:0:

  54. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.h:13:21: warning: extra tokens at end of #ifndef directive

  55. #ifndef _RA8876_LITE.H

  56.                      ^

  57. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.h:14:21: warning: ISO C++11 requires whitespace after the macro name

  58. #define _RA8876_LITE.H

  59.                      ^

  60. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp: In member function 'boolean Ra8876_Lite::begin()':

  61. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:25:19: error: no matching function for call to 'SPIClass::begin(int&)'

  62.    SPI.begin(_xnscs);

  63.                    ^

  64. In file included from C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:9:0:

  65. 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()

  66.    static void begin();

  67.                ^~~~~

  68. 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

  69. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:28:32: error: no matching function for call to 'SPIClass::setClockDivider(int&, int)'

  70.    SPI.setClockDivider(_xnscs,21);

  71.                                 ^

  72. In file included from C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:9:0:

  73. 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)

  74.    inline static void setClockDivider(uint8_t clockDiv) {

  75.                       ^~~~~~~~~~~~~~~

  76. 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

  77. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:29:35: error: no matching function for call to 'SPIClass::setDataMode(int&, int)'

  78.    SPI.setDataMode(_xnscs,SPI_MODE0);

  79.                                    ^

  80. In file included from C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:9:0:

  81. 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)

  82.    inline static void setDataMode(uint8_t dataMode) {

  83.                       ^~~~~~~~~~~

  84. 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

  85. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:62:31: error: no matching function for call to 'SPIClass::setClockDivider(int&, int)'

  86.    SPI.setClockDivider(_xnscs,2);

  87.                                ^

  88. In file included from C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:9:0:

  89. 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)

  90.    inline static void setClockDivider(uint8_t clockDiv) {

  91.                       ^~~~~~~~~~~~~~~

  92. 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

  93. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp: In member function 'void Ra8876_Lite::lcdRegWrite(ru8)':

  94. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:129:43: error: 'SPI_CONTINUE' was not declared in this scope

  95.    SPI.transfer(_xnscs,RA8876_SPI_CMDWRITE,SPI_CONTINUE);

  96.                                            ^~~~~~~~~~~~

  97. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:130:16: warning: invalid conversion from 'int' to 'void*' [-fpermissive]

  98.    SPI.transfer(_xnscs,reg);

  99.                 ^~~~~~

  100. In file included from C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:9:0:

  101. 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)'

  102.    inline static void transfer(void *buf, size_t count) {

  103.                       ^~~~~~~~

  104. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp: In member function 'void Ra8876_Lite::lcdDataWrite(ru8)':

  105. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:136:44: error: 'SPI_CONTINUE' was not declared in this scope

  106.    SPI.transfer(_xnscs,RA8876_SPI_DATAWRITE,SPI_CONTINUE);

  107.                                             ^~~~~~~~~~~~

  108. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:137:16: warning: invalid conversion from 'int' to 'void*' [-fpermissive]

  109.    SPI.transfer(_xnscs,data);

  110.                 ^~~~~~

  111. In file included from C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:9:0:

  112. 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)'

  113.    inline static void transfer(void *buf, size_t count) {

  114.                       ^~~~~~~~

  115. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp: In member function 'ru8 Ra8876_Lite::lcdDataRead()':

  116. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:143:43: error: 'SPI_CONTINUE' was not declared in this scope

  117.    SPI.transfer(_xnscs,RA8876_SPI_DATAREAD,SPI_CONTINUE);

  118.                                            ^~~~~~~~~~~~

  119. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:144:27: warning: invalid conversion from 'int' to 'void*' [-fpermissive]

  120.    ru8 data = SPI.transfer(_xnscs,0xff);

  121.                            ^~~~~~

  122. In file included from C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:9:0:

  123. 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)'

  124.    inline static void transfer(void *buf, size_t count) {

  125.                       ^~~~~~~~

  126. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:144:38: error: void value not ignored as it ought to be

  127.    ru8 data = SPI.transfer(_xnscs,0xff);

  128.                                       ^

  129. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp: In member function 'ru8 Ra8876_Lite::lcdStatusRead()':

  130. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:151:45: error: 'SPI_CONTINUE' was not declared in this scope

  131.    SPI.transfer(_xnscs,RA8876_SPI_STATUSREAD,SPI_CONTINUE);

  132.                                              ^~~~~~~~~~~~

  133. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:152:26: warning: invalid conversion from 'int' to 'void*' [-fpermissive]

  134.    ru8 data= SPI.transfer(_xnscs,0xff);

  135.                           ^~~~~~

  136. In file included from C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:9:0:

  137. 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)'

  138.    inline static void transfer(void *buf, size_t count) {

  139.                       ^~~~~~~~

  140. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:152:37: error: void value not ignored as it ought to be

  141.    ru8 data= SPI.transfer(_xnscs,0xff);

  142.                                      ^

  143. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp: In member function 'void Ra8876_Lite::lcdDataWrite16bbp(ru16)':

  144. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:175:44: error: 'SPI_CONTINUE' was not declared in this scope

  145.    SPI.transfer(_xnscs,RA8876_SPI_DATAWRITE,SPI_CONTINUE);

  146.                                             ^~~~~~~~~~~~

  147. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:177:16: warning: invalid conversion from 'int' to 'void*' [-fpermissive]

  148.    SPI.transfer(_xnscs,data>>8);

  149.                 ^~~~~~

  150. In file included from C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:9:0:

  151. 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)'

  152.    inline static void transfer(void *buf, size_t count) {

  153.                       ^~~~~~~~

  154. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp: In member function 'boolean Ra8876_Lite::ra8876SdramInitial()':

  155. C:\Users\wuliaaa\Documents\Arduino\libraries\Ra8876_Lite\Ra8876_Lite.cpp:477:29: warning: integer overflow in expression [-Woverflow]

  156.    Auto_Refresh=(64*DRAM_FREQ*1000)/(4096);

  157.                  ~~~~~~~~~~~~^~~~~

  158. exit status 1

  159. 为开发板 Arduino Mega or Mega 2560 编译时出错
复制代码



您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|手机版|Arduino中文社区

GMT+8, 2024-11-28 19:24 , Processed in 0.074806 second(s), 16 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表