jamesbowman/gd2-lib

Does not compile on Due

Closed this issue · 1 comments

Reported:

I'm testing GD3 on Arduino DUE.

The Hello World example won't compile. Here the error:

In file included from /var/folders/t5/x9_b_ncj7xlclkqshk_fq5dr0000gp/T/arduino_modified_sketch_696975/helloworld.ino:4:0:
/win/d/projects/avr/sketch/libraries/Gameduino2/GD2.h: In member function 'void Reader::fetch512(byte*)':
/win/d/projects/avr/sketch/libraries/Gameduino2/GD2.h:720:50: error: no matching function for call to 'ASPI_t::transfer(byte*&, int)'
     memset(dst, 0xff, 512); SPI.transfer(dst, 512);
                                                  ^
/win/d/projects/avr/sketch/libraries/Gameduino2/GD2.h:720:50: note: candidate is:
In file included from /var/folders/t5/x9_b_ncj7xlclkqshk_fq5dr0000gp/T/arduino_modified_sketch_696975/helloworld.ino:4:0:
/win/d/projects/avr/sketch/libraries/Gameduino2/GD2.h:61:8: note: byte ASPI_t::transfer(byte)
   byte transfer(byte x ) {
        ^
/win/d/projects/avr/sketch/libraries/Gameduino2/GD2.h:61:8: note:   candidate expects 1 argument, 2 provided
exit status 1

Looks like the SPI emulation class ASPI needs the new block transfer() method.

Fixed, all examples now build.