STM32F103C 驱动ST7789
以前一直用STM32F103c8t驱动ST7789很正常,由于从新安装了系统,下载库后就编译不成功了,麻烦大神帮忙看看怎么修改,我改了很多都不行,谢谢各位了C:\Users\Administrator\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp: In member function 'void Adafruit_SPIDevice::transfer(uint8_t*, size_t)':
C:\Users\Administrator\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:119:31: error: no matching function for call to 'SPIClass::transfer(uint8_t*&, size_t&)'
_spi->transfer(buffer, len);
^
C:\Users\Administrator\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:119:31: note: candidate is:
In file included from C:\Users\Administrator\Documents\Arduino\libraries\Adafruit_BusIO/Adafruit_SPIDevice.h:1:0,
from C:\Users\Administrator\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:1:
C:\Users\Administrator\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2020.8.9\libraries\SPI\src/SPI.h:285:11: note: uint8 SPIClass::transfer(uint8) const
uint8 transfer(uint8) const;
^
C:\Users\Administrator\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2020.8.9\libraries\SPI\src/SPI.h:285:11: note: candidate expects 1 argument, 2 provided
"Wire.h" 对应多个库
已使用: C:\Users\Administrator\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2020.8.9\libraries\Wire
未使用:C:\Users\Administrator\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2020.8.9\libraries\WireSlave
exit status 1
为开发板 Generic STM32F103C series 编译时出错。
挂了很久的问题也没大神帮忙解答,通过各方资料查询终于找到原因,arduino用在STM32上,有3个开发板地址,只有以下路劲的开发板可以使用GFX支持的屏幕,其他的都会提示note: candidate expects 1 argument, 2 provided错误,都怪我为了追求更新,就从新下载了开发板支持库,不能使用的原因是STM32的SPI库构造函数SPIClass::transfer与BUSIo的不匹配导致的,如果有遇到和我同样问题的可以试试,也给自己留个记录,以便以后遇到可以参考
开发板支持库:https://github.com/stm32duino/Arduino_Core_STM32
这个库用arduino的开发板管理器好像下载失败,可以到网站下载,或者也可以将此库里SPI文件夹下的SPI.h和SPI.cpp替换不能用的也可以正常使用。 虽然看不懂,但支持楼主,我研究SPI好几天了,LCD用U8G2一直没点亮,估计管脚问题
页:
[1]