Will not compile for ESP32
Opened this issue · 1 comments
Upon compiling with the newest version of the GD2 library from the repo for ESP32, there is an SPI error:
In file included from D:\Graeme\Documents\Arduino\libraries\gd2-lib-master\GD2.cpp:40:0: D:\Graeme\Documents\Arduino\libraries\gd2-lib-master\transports/wiring.h: In member function 'void GDTransport::daz_rd(uint8_t*, size_t)': D:\Graeme\Documents\Arduino\libraries\gd2-lib-master\transports/wiring.h:432:29: error: invalid conversion from 'char*' to 'uint8_t* {aka unsigned char*}' [-fpermissive] SPI.transfer((char*)s, n); ^ In file included from D:\Graeme\Documents\Arduino\libraries\gd2-lib-master\GD2.cpp:10:0: C:\Users\graae\.platformio\packages\framework-arduinoespressif32\libraries\SPI\src/SPI.h:70:10: note: initializing argument 1 of 'void SPIClass::transfer(uint8_t*, uint32_t)' void transfer(uint8_t * data, uint32_t size); ^ *** [.pio\build\esp32doit-devkit-v1\libb73\gd2-lib-master\GD2.cpp.o] Error 1
I have encountered the same error and fixed as below, in file transports/wiring.h
change line 432 from:
SPI.transfer((char*)s, n);
to
SPI.transfer(s, n);