Okay, frankly I really don't know where to start but let's go there ..
Files program
Screen pin

ILI9341 TFT Nano RP2040 Connect
-------------------------------
VCC 3V3
GND GND
CS D10
RESET RESET
DC D9
SDI(MOSI) D11 (SPI0 TX)
SCK D13 (SPI0 SCK)
LED 3V3
SDA(MISO) D12 (SPI0 RX)
The first file I found interesting :
davega_ili9225_screen.cpp
#include "davega_ili9225_screen.h"
#define TFT_RST 12
#define TFT_RS 9
#define TFT_CS 10 // SS
#define TFT_SDI 11 // MOSI
#define TFT_CLK 13 // SCK
#define TFT_LED 0
TFT_22_ILI9225 tft = TFT_22_ILI9225(TFT_RST, TFT_RS, TFT_CS, TFT_LED, 200);
TFT_22_ILI9225* p_tft = nullptr;
void DavegaILI9225Screen::init(t_davega_screen_config *config) {
DavegaScreen::init(config);
if (!p_tft) {
p_tft = &tft;
p_tft->begin();
p_tft->setOrientation(config->orientation);
p_tft->setBackgroundColor(COLOR_BLACK);
}
_tft = p_tft;
}
TFT_22_ILI9225* get_tft_22_ili9225()
{
return p_tft;
}
and :
davega_ili9225_screen.h
#ifndef DAVEGA_ILI9225_SCREEN_H
#define DAVEGA_ILI9225_SCREEN_H
#include "davega_screen.h"
#include <TFT_22_ILI9225.h>
class DavegaILI9225Screen: public DavegaScreen {
public:
void init(t_davega_screen_config* config) override;
protected:
TFT_22_ILI9225* _tft;
};
TFT_22_ILI9225* get_tft_22_ili9225();
#endif //DAVEGA_ILI9225_H
I think I can replace these 2 files
davega_ili9225_screen.cpp
davega_ili9225_screen.h
TFT_22_ILI9225.h
by
Adafruit_ILI9341.cpp
Adafruit_ILI9341.h
Adafruit_ILI9341.h (not sure)
Then rename in each line of program code
the name of the new driver