|
本帖最后由 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 编译时出错。
|
-
报错截图
|