Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Will not compile for ESP32 #38

Open
graemecoard opened this issue Feb 4, 2022 · 1 comment
Open

Will not compile for ESP32 #38

graemecoard opened this issue Feb 4, 2022 · 1 comment

Comments

@graemecoard
Copy link

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

@garageeks
Copy link

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants