Bodmer / TFT_eFX

An example graphics extension library for TFT_eSPI
Other
19 stars 5 forks source link

Adding support for rp2040 #2

Closed eagl1 closed 3 months ago

eagl1 commented 4 months ago

Hi,

I'm using GUISlice and I want to embed an image and I have to enable GSLC_SPIFFS_EN in which will initialize an object from TFT_eFEX

#if (GSLC_SPIFFS_EN)
  // Create TFT_eFEX object "fex" with pointer to "m_disp" object
  TFT_eFEX fex = TFT_eFEX(&m_disp);
#endif

But in TFT_eFEX.h, it only supports ESP8266 and ESP32.

// Call up the SPIFFS FLASH filing system this is part of the ESP Core
#if defined (ESP8266) || defined (ESP32)
  #define FS_NO_GLOBALS
  #include <FS.h>
#endif

#ifdef ESP32
  #include "rom/tjpgd.h" // For native ESP32 jpeg decoder
  #include "SPIFFS.h"    // ESP32 only
#endif

Is adding the rp2040 easy at this point ? Can I just do this:

// Call up the SPIFFS FLASH filing system this is part of the ESP Core
#if defined (ESP8266) || defined (ESP32) || defined(ARDUINO_ARCH_MBED_RP2040) || defined(ARDUINO_ARCH_RP2040)
  #define FS_NO_GLOBALS
  #include <FS.h>
#endif

But if I do that, I still get this warning in the arduino code:

WARNING: library TFT_eFEX-master claims to run on esp8266, esp32 architecture(s) and may be incompatible with your current board which runs on rp2040 architecture(s).

What I should do ?

eagl1 commented 3 months ago

Code can be managed after the last fix for GUIslice_Image2C.