XarkLabs / PDQ_GFX_Libs

Optimized fork of Adafruit's GFX library (and drivers) for Arduino (AVR).
114 stars 37 forks source link

Parameter ILI9340_SAVE_SPCR doesn't work #6

Open Pin666 opened 8 years ago

Pin666 commented 8 years ago

When you change parameter ILI9340_SAVE_SPCR from 0 to 1 in test project PDQ_graphicstest/PDQ_ILI9340config.h like the comment indicates // <= 0/1 with 1 to save/restore AVR SPI control register (to "play nice" when other SPI use)_

the project will no longer compile.

Error: PDQ_ILI9340.h: In static member function 'static void PDQ_ILI9340::spi_begin()': PDQ_ILI9340.h:200:23: error: 'swap' was not declared in this scope swap(save_SPCR, SPCR); // swap initial/current SPCR settings

Pin666 commented 8 years ago

I guess I found the mistake. The function swap doesn't exist in file PDQ_GFX.h. Instead the name of the function is swapValue. So replace swap by swapValue in file PDQ_ILI9340.h