Adafruit_BusIO库报错,Arduino环境配置-Arduino中文社区 - Powered by Discuz!

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 578|回复: 1

[未解决] Adafruit_BusIO库报错,Arduino环境配置

[复制链接]
发表于 2022-8-24 12:59 | 显示全部楼层 |阅读模式
本帖最后由 ChenRuiStudent 于 2022-8-24 12:59 编辑

铁汁们,这个报错有知道的吗?如果给强制转换成uint8_t,会报丢失精度的错,好像只是箭头指的那个Adafruit_BusIO库的事,重新装了两次还是不行,有遇到同样问题的朋友吗?下边为报错信息,希望朋友们给予帮助,感谢!!!




D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp: In member function 'bool Adafruit_SPIDevice::write(const uint8_t*, size_t, const uint8_t*, size_t)':
D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:335:61: error: invalid conversion from 'const uint8_t* {aka const unsigned char*}' to 'uint8_t* {aka unsigned char*}' [-fpermissive]
       _spi->transferBytes(prefix_buffer, nullptr, prefix_len);
                                                             ^
In file included from D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.h:9:0,
                 from D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:1:
D:\Program Files (x86)\arduino1\hardware\espressif\esp32\libraries\SPI\src/SPI.h:70:10: note:   initializing argument 1 of 'void SPIClass::transferBytes(uint8_t*, uint8_t*, uint32_t)'
     void transferBytes(uint8_t * data, uint8_t * out, uint32_t size);
          ^
D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:338:47: error: invalid conversion from 'const uint8_t* {aka const unsigned char*}' to 'uint8_t* {aka unsigned char*}' [-fpermissive]
       _spi->transferBytes(buffer, nullptr, len);
                                               ^
In file included from D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.h:9:0,
                 from D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:1:
D:\Program Files (x86)\arduino1\hardware\espressif\esp32\libraries\SPI\src/SPI.h:70:10: note:   initializing argument 1 of 'void SPIClass::transferBytes(uint8_t*, uint8_t*, uint32_t)'
     void transferBytes(uint8_t * data, uint8_t * out, uint32_t size);
          ^
D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp: In member function 'bool Adafruit_SPIDevice::write_then_read(const uint8_t*, size_t, uint8_t*, size_t, uint8_t)':
D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:429:59: error: invalid conversion from 'const uint8_t* {aka const unsigned char*}' to 'uint8_t* {aka unsigned char*}' [-fpermissive]
       _spi->transferBytes(write_buffer, nullptr, write_len);
                                                           ^
In file included from D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.h:9:0,
                 from D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:1:
D:\Program Files (x86)\arduino1\hardware\espressif\esp32\libraries\SPI\src/SPI.h:70:10: note:   initializing argument 1 of 'void SPIClass::transferBytes(uint8_t*, uint8_t*, uint32_t)'
     void transferBytes(uint8_t * data, uint8_t * out, uint32_t size);
          ^
exit status 1
为开发板 ESP32F 编译时出错。


报错截图

报错截图
发表于 2022-9-16 03:01 | 显示全部楼层
same error(s) entered 09/15/2022
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2024-12-1 01:28 , Processed in 0.123405 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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