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