title: Arduino w/ TFT display - can't use PImage as an argument
body: <p>I am working on a project that involves Arduino together with a TFT-display. I have created a class <strong>tft</strong> in cpp to initialize the tft display. I get an error when compiling saying "tft.h:18: error: 'PImage' has not been declared".
  The line it's complaing about is (in h-file)</p>
  
  <pre><code>     uint8_t initScreen(TFT TFTscreen, PImage backgroundImage, uint8_t CS_SD, uint8_t CS_LD, uint8_t DC_LD, uint8_t RESET); 
  </code></pre>
  
  <p>In the main program the PImage is declared as:</p>
  
  <pre><code>    TFT TFTscreen = TFT(CS_LD, DC_LD, RESET); 
      PImage backgroundImage;      
  </code></pre>
  
  <p>In the tft class I have the following declarations: </p>
  
  <pre><code>    #include "Arduino.h"
      #include "tft.h"
      #include &lt;TFT.h&gt;
      #include &lt;SPI.h&gt;
      #include &lt;SD.h&gt;
  
      tftclass::tftclass(){}
  
      uint8_t tftclass::initScreen(TFT TFTscreen, PImage backgroundImage, uint8_t CS_SD, uint8_t CS_LD, uint8_t DC_LD, uint8_t RESET)
  
      void tftclass::resetBackground(TFT TFTscreen, PImage backgroundImage)
  </code></pre>
  
  <p>The declaration in the header file is as following:</p>
  
  <pre><code>    #ifndef tft_h
      #define tft_h
  
      #include &lt;TFT.h&gt;
      #include &lt;SPI.h&gt;
      #include &lt;SD.h&gt;
  
      class tftclass{
  
      public:
          tftclass();
          uint8_t initScreen(TFT TFTscreen, PImage backgroundImage, uint8_t CS_SD, uint8_t CS_LD, uint8_t DC_LD, uint8_t RESET);
          void resetBackground(TFT TFTscreen, PImage backgroundImage);
      };
  
      extern tftclass tft;
  
      #endif  
  </code></pre>
  
  <p>Anyone having any idea? </p>
  
  <p>Thanks in advance. </p>