Nkawu / TFT_22_ILI9225

Arduino library for 2.2" TFT display modules with ILI9225 driver
GNU General Public License v3.0
82 stars 43 forks source link

Compatibilidad con raspberry pi pico #77

Open Luuciano27 opened 3 years ago

Luuciano27 commented 3 years ago

Hola, estoy teniendo problemas para usar esta libreria con raspberry pi pico, uso platformio en visual studio code, los errores son los siguientes:

.pio\libdeps\pico\TFT 22 ILI9225\src\DefaultFonts.c:11:30: error: unknown type name 'uint8_t'
   11 |   #define fontdatatype const uint8_t
      |                              ^~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\DefaultFonts.c:20:1: note: in expansion of macro 'fontdatatype'
   20 | fontdatatype Terminal6x8[] PROGMEM = {
      | ^~~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\DefaultFonts.c:20:28: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PROGMEM'
   20 | fontdatatype Terminal6x8[] PROGMEM = {
      |                            ^~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\DefaultFonts.c:11:30: error: unknown type name 'uint8_t'
   11 |   #define fontdatatype const uint8_t
      |                              ^~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\DefaultFonts.c:128:1: note: in expansion of macro 'fontdatatype'
  128 | fontdatatype Terminal11x16[] PROGMEM = {
      | ^~~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\DefaultFonts.c:128:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PROGMEM'
  128 | fontdatatype Terminal11x16[] PROGMEM = {
      |                              ^~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\DefaultFonts.c:11:30: error: unknown type name 'uint8_t'
   11 |   #define fontdatatype const uint8_t
      |                              ^~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\DefaultFonts.c:236:1: note: in expansion of macro 'fontdatatype'
  236 | fontdatatype Terminal12x16[] PROGMEM = {
      | ^~~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\DefaultFonts.c:236:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PROGMEM'
  236 | fontdatatype Terminal12x16[] PROGMEM = {
      |                              ^~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\DefaultFonts.c:11:30: error: unknown type name 'uint8_t'
   11 |   #define fontdatatype const uint8_t
      |                              ^~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\DefaultFonts.c:344:1: note: in expansion of macro 'fontdatatype'
  344 | fontdatatype Trebuchet_MS16x21[] PROGMEM = {
      | ^~~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\DefaultFonts.c:344:34: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PROGMEM'
  344 | fontdatatype Trebuchet_MS16x21[] PROGMEM = {
      |                                  ^~~~~~~
Compiling .pio\build\pico\FrameworkArduinoVariant\double_tap_usb_boot.c.o
*** [.pio\build\pico\libe47\TFT 22 ILI9225\DefaultFonts.c.o] Error 1
In file included from src\main.cpp:4:
.pio\libdeps\pico\TFT 22 ILI9225\src/TFT_22_ILI9225.h:419:18: error: 'RwReg' does not name a type
  419 |         volatile RwReg *mosiport, *clkport, *dcport, *rsport, *csport;
      |                  ^~~~~
*** [.pio\build\pico\src\main.cpp.o] Error 1
In file included from .pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:1:
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.h:419:18: error: 'RwReg' does not name a type
  419 |         volatile RwReg *mosiport, *clkport, *dcport, *rsport, *csport;
      |                  ^~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp: In member function 'void TFT_22_ILI9225::begin()':
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:281:5: error: 'csport' was not declared in this scope; did you mean 'ushort'?
  281 |     csport    = portOutputRegister(digitalPinToPort(_cs));
      |     ^~~~~~
      |     ushort
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:281:17: error: 'portOutputRegister' was not declared in this scope
  281 |     csport    = portOutputRegister(digitalPinToPort(_cs));
      |                 ^~~~~~~~~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:282:17: error: 'digitalPinToBitMask' was not declared in this scope; did you mean 'digitalPinToPinName'?
  282 |     cspinmask = digitalPinToBitMask(_cs);
      |                 ^~~~~~~~~~~~~~~~~~~
      |                 digitalPinToPinName
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:283:5: error: 'dcport' was not declared in this scope
  283 |     dcport    = portOutputRegister(digitalPinToPort(_rs));
      |     ^~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:294:9: error: 'clkport' was not declared in this scope
  294 |         clkport     = portOutputRegister(digitalPinToPort(_clk));
      |         ^~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:296:9: error: 'mosiport' was not declared in this scope
  296 |         mosiport    = portOutputRegister(digitalPinToPort(_sdi));
      |         ^~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:301:9: error: 'clkport' was not declared in this scope
  301 |         clkport     = 0;
      |         ^~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:303:9: error: 'mosiport' was not declared in this scope
  303 |         mosiport    = 0;
      |         ^~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp: In member function 'void TFT_22_ILI9225::_spiWrite(uint8_t)':
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:64:38: error: 'mosiport' was not declared in this scope
   64 |     #define SSPI_MOSI_HIGH()        *mosiport |=  mosipinmask
      |                                      ^~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:410:13: note: in expansion of macro 'SSPI_MOSI_HIGH'
  410 |             SSPI_MOSI_HIGH();
      |             ^~~~~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:65:38: error: 'mosiport' was not declared in this scope
   65 |     #define SSPI_MOSI_LOW()         *mosiport &= ~mosipinmask
      |                                      ^~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:412:13: note: in expansion of macro 'SSPI_MOSI_LOW'
  412 |             SSPI_MOSI_LOW();
      |             ^~~~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:66:38: error: 'clkport' was not declared in this scope
   66 |     #define SSPI_SCK_HIGH()         *clkport |=  clkpinmask
      |                                      ^~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:414:9: note: in expansion of macro 'SSPI_SCK_HIGH'
  414 |         SSPI_SCK_HIGH();
      |         ^~~~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp: In member function 'void TFT_22_ILI9225::_spiWriteCommand(uint8_t)':
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:51:38: error: 'dcport' was not declared in this scope
   51 |     #define SPI_DC_LOW()            *dcport &= ~dcpinmask
      |                                      ^~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:434:5: note: in expansion of macro 'SPI_DC_LOW'
  434 |     SPI_DC_LOW();
      |     ^~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:53:38: error: 'csport' was not declared in this scope; did you mean 'ushort'?
   53 |     #define SPI_CS_LOW()            *csport &= ~cspinmask
      |                                      ^~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:435:5: note: in expansion of macro 'SPI_CS_LOW'
  435 |     SPI_CS_LOW();
      |     ^~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp: In member function 'void TFT_22_ILI9225::_spiWriteData(uint8_t)':
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:50:38: error: 'dcport' was not declared in this scope
   50 |     #define SPI_DC_HIGH()           *dcport |=  dcpinmask
      |                                      ^~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:442:5: note: in expansion of macro 'SPI_DC_HIGH'
  442 |     SPI_DC_HIGH();
      |     ^~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:53:38: error: 'csport' was not declared in this scope; did you mean 'ushort'?
   53 |     #define SPI_CS_LOW()            *csport &= ~cspinmask
      |                                      ^~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:443:5: note: in expansion of macro 'SPI_CS_LOW'
  443 |     SPI_CS_LOW();
      |     ^~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp: In member function 'void TFT_22_ILI9225::_writeCommand16(uint16_t)':
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:51:38: error: 'dcport' was not declared in this scope
   51 |     #define SPI_DC_LOW()            *dcport &= ~dcpinmask
      |                                      ^~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:809:5: note: in expansion of macro 'SPI_DC_LOW'
  809 |     SPI_DC_LOW();
      |     ^~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:53:38: error: 'csport' was not declared in this scope; did you mean 'ushort'?
   53 |     #define SPI_CS_LOW()            *csport &= ~cspinmask
      |                                      ^~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:810:5: note: in expansion of macro 'SPI_CS_LOW'
  810 |     SPI_CS_LOW();
      |     ^~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:64:38: error: 'mosiport' was not declared in this scope
   64 |     #define SSPI_MOSI_HIGH()        *mosiport |=  mosipinmask
      |                                      ^~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:822:17: note: in expansion of macro 'SSPI_MOSI_HIGH'
  822 |                 SSPI_MOSI_HIGH();
      |                 ^~~~~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:65:38: error: 'mosiport' was not declared in this scope
   65 |     #define SSPI_MOSI_LOW()         *mosiport &= ~mosipinmask
      |                                      ^~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:824:17: note: in expansion of macro 'SSPI_MOSI_LOW'
  824 |                 SSPI_MOSI_LOW();
      |                 ^~~~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:66:38: error: 'clkport' was not declared in this scope
   66 |     #define SSPI_SCK_HIGH()         *clkport |=  clkpinmask
      |                                      ^~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:826:13: note: in expansion of macro 'SSPI_SCK_HIGH'
  826 |             SSPI_SCK_HIGH();
      |             ^~~~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp: In member function 'void TFT_22_ILI9225::_writeData16(uint16_t)':
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:50:38: error: 'dcport' was not declared in this scope
   50 |     #define SPI_DC_HIGH()           *dcport |=  dcpinmask
      |                                      ^~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:835:5: note: in expansion of macro 'SPI_DC_HIGH'
  835 |     SPI_DC_HIGH();
      |     ^~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:53:38: error: 'csport' was not declared in this scope; did you mean 'ushort'?
   53 |     #define SPI_CS_LOW()            *csport &= ~cspinmask
      |                                      ^~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:836:5: note: in expansion of macro 'SPI_CS_LOW'
  836 |     SPI_CS_LOW();
      |     ^~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:64:38: error: 'mosiport' was not declared in this scope
   64 |     #define SSPI_MOSI_HIGH()        *mosiport |=  mosipinmask
      |                                      ^~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:848:17: note: in expansion of macro 'SSPI_MOSI_HIGH'
  848 |                 SSPI_MOSI_HIGH();
      |                 ^~~~~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:65:38: error: 'mosiport' was not declared in this scope
   65 |     #define SSPI_MOSI_LOW()         *mosiport &= ~mosipinmask
      |                                      ^~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:850:17: note: in expansion of macro 'SSPI_MOSI_LOW'
  850 |                 SSPI_MOSI_LOW();
      |                 ^~~~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:66:38: error: 'clkport' was not declared in this scope
   66 |     #define SSPI_SCK_HIGH()         *clkport |=  clkpinmask
      |                                      ^~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:852:13: note: in expansion of macro 'SSPI_SCK_HIGH'
  852 |             SSPI_SCK_HIGH();
      |             ^~~~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp: In member function 'void TFT_22_ILI9225::drawBitmap(uint16_t, uint16_t, const uint16_t**, int16_t, int16_t)':
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:50:38: error: 'dcport' was not declared in this scope
   50 |     #define SPI_DC_HIGH()           *dcport |=  dcpinmask
      |                                      ^~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:1190:5: note: in expansion of macro 'SPI_DC_HIGH'
 1190 |     SPI_DC_HIGH();
      |     ^~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:53:38: error: 'csport' was not declared in this scope; did you mean 'ushort'?
   53 |     #define SPI_CS_LOW()            *csport &= ~cspinmask
      |                                      ^~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:1191:5: note: in expansion of macro 'SPI_CS_LOW'
 1191 |     SPI_CS_LOW();
      |     ^~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp: In member function 'void TFT_22_ILI9225::drawBitmap(uint16_t, uint16_t, uint16_t**, int16_t, int16_t)':
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:50:38: error: 'dcport' was not declared in this scope
   50 |     #define SPI_DC_HIGH()           *dcport |=  dcpinmask
      |                                      ^~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:1212:5: note: in expansion of macro 'SPI_DC_HIGH'
 1212 |     SPI_DC_HIGH();
      |     ^~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:53:38: error: 'csport' was not declared in this scope; did you mean 'ushort'?
   53 |     #define SPI_CS_LOW()            *csport &= ~cspinmask
      |                                      ^~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:1213:5: note: in expansion of macro 'SPI_CS_LOW'
 1213 |     SPI_CS_LOW();
      |     ^~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp: In member function 'void TFT_22_ILI9225::drawBitmap(uint16_t, uint16_t, const uint16_t*, int16_t, int16_t)':
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:50:38: error: 'dcport' was not declared in this scope
   50 |     #define SPI_DC_HIGH()           *dcport |=  dcpinmask
      |                                      ^~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:1234:5: note: in expansion of macro 'SPI_DC_HIGH'
 1234 |     SPI_DC_HIGH();
      |     ^~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:53:38: error: 'csport' was not declared in this scope; did you mean 'ushort'?
   53 |     #define SPI_CS_LOW()            *csport &= ~cspinmask
      |                                      ^~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:1235:5: note: in expansion of macro 'SPI_CS_LOW'
 1235 |     SPI_CS_LOW();
      |     ^~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp: In member function 'void TFT_22_ILI9225::drawBitmap(uint16_t, uint16_t, uint16_t*, int16_t, int16_t)':
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:50:38: error: 'dcport' was not declared in this scope
   50 |     #define SPI_DC_HIGH()           *dcport |=  dcpinmask
      |                                      ^~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:1253:5: note: in expansion of macro 'SPI_DC_HIGH'
 1253 |     SPI_DC_HIGH();
      |     ^~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:53:38: error: 'csport' was not declared in this scope; did you mean 'ushort'?
   53 |     #define SPI_CS_LOW()            *csport &= ~cspinmask
      |                                      ^~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:1254:5: note: in expansion of macro 'SPI_CS_LOW'
 1254 |     SPI_CS_LOW();
      |     ^~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp: In member function 'void TFT_22_ILI9225::startWrite()':
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:53:38: error: 'csport' was not declared in this scope; did you mean 'ushort'?
   53 |     #define SPI_CS_LOW()            *csport &= ~cspinmask
      |                                      ^~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:1271:9: note: in expansion of macro 'SPI_CS_LOW'
 1271 |         SPI_CS_LOW();
      |         ^~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp: In member function 'void TFT_22_ILI9225::endWrite()':
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:52:38: error: 'csport' was not declared in this scope; did you mean 'ushort'?
   52 |     #define SPI_CS_HIGH()           *csport |=  cspinmask
      |                                      ^~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:1278:9: note: in expansion of macro 'SPI_CS_HIGH'
 1278 |         SPI_CS_HIGH();
      |         ^~~~~~~~~~~
In file included from C:\Users\Luciano\.platformio\packages\framework-arduino-mbed\cores\arduino/api/String.h:33,
                 from C:\Users\Luciano\.platformio\packages\framework-arduino-mbed\cores\arduino/api/IPAddress.h:24,
                 from C:\Users\Luciano\.platformio\packages\framework-arduino-mbed\cores\arduino/api/ArduinoAPI.h:30,
                 from C:\Users\Luciano\.platformio\packages\framework-arduino-mbed\cores\arduino/Arduino.h:30,
                 from .pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.h:20,
                 from .pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:1:
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp: In member function 'uint16_t TFT_22_ILI9225::drawGFXChar(int16_t, int16_t, unsigned char, uint16_t)':
C:\Users\Luciano\.platformio\packages\framework-arduino-mbed\cores\arduino/api/deprecated-avr-comp/avr/pgmspace.h:104:32: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  104 | #define pgm_read_dword(addr) (*(const unsigned long *)(addr))
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:42:45: note: in expansion of macro 'pgm_read_dword'
   42 |     #define pgm_read_pointer(addr) ((void *)pgm_read_dword(addr))
      |                                             ^~~~~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:1315:39: note: in expansion of macro 'pgm_read_pointer'
 1315 |     GFXglyph *glyph  = &(((GFXglyph *)pgm_read_pointer(&gfxFont->glyph))[c]);
      |                                       ^~~~~~~~~~~~~~~~
C:\Users\Luciano\.platformio\packages\framework-arduino-mbed\cores\arduino/api/deprecated-avr-comp/avr/pgmspace.h:104:32: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  104 | #define pgm_read_dword(addr) (*(const unsigned long *)(addr))
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:42:45: note: in expansion of macro 'pgm_read_dword'
   42 |     #define pgm_read_pointer(addr) ((void *)pgm_read_dword(addr))
      |                                             ^~~~~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:1316:35: note: in expansion of macro 'pgm_read_pointer'
 1316 |     uint8_t  *bitmap = (uint8_t *)pgm_read_pointer(&gfxFont->bitmap);
      |                                   ^~~~~~~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp: In member function 'void TFT_22_ILI9225::getGFXCharExtent(uint8_t, int16_t*, int16_t*, int16_t*)':
C:\Users\Luciano\.platformio\packages\framework-arduino-mbed\cores\arduino/api/deprecated-avr-comp/avr/pgmspace.h:104:32: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  104 | #define pgm_read_dword(addr) (*(const unsigned long *)(addr))
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:42:45: note: in expansion of macro 'pgm_read_dword'
   42 |     #define pgm_read_pointer(addr) ((void *)pgm_read_dword(addr))
      |                                             ^~~~~~~~~~~~~~
.pio\libdeps\pico\TFT 22 ILI9225\src\TFT_22_ILI9225.cpp:1351:42: note: in expansion of macro 'pgm_read_pointer'
 1351 |         GFXglyph *glyph = &(((GFXglyph *)pgm_read_pointer(&gfxFont->glyph))[c - first]);
      |                                          ^~~~~~~~~~~~~~~~
*** [.pio\build\pico\libe47\TFT 22 ILI9225\TFT_22_ILI9225.cpp.o] Error 1

El codigo que estoy usando es el siguiente:

#include <Arduino.h>
#include "SPI.h"
#include "TFT_22_ILI9225.h"

// Include font definition files
// NOTE: These files may not have all characters defined! Check the GFXfont def
// params 3 + 4, e.g. 0x20 = 32 = space to 0x7E = 126 = ~

#include <../fonts/FreeSans12pt7b.h>
#include <../fonts/FreeSans24pt7b.h>

#if defined (ARDUINO_ARCH_STM32F1)
#define TFT_RST PA1
#define TFT_RS  PA2
#define TFT_CS  PA0 // SS
#define TFT_SDI PA7 // MOSI
#define TFT_CLK PA5 // SCK
#define TFT_LED 0 // 0 if wired to +5V directly
#elif defined(ESP8266)
#define TFT_RST 4   // D2
#define TFT_RS  5   // D1
#define TFT_CLK 14  // D5 SCK
//#define TFT_SDO 12  // D6 MISO
#define TFT_SDI 13  // D7 MOSI
#define TFT_CS  15  // D8 SS
#define TFT_LED 2   // D4     set 0 if wired to +5V directly -> D3=0 is not possible !!
#elif defined(ESP32)
#define TFT_RST 26  // IO 26
#define TFT_RS  25  // IO 25
#define TFT_CLK 14  // HSPI-SCK
//#define TFT_SDO 12  // HSPI-MISO
#define TFT_SDI 13  // HSPI-MOSI
#define TFT_CS  15  // HSPI-SS0
#define TFT_LED 0 // 0 if wired to +5V directly
#else
#define TFT_RST 6
#define TFT_RS  7
#define TFT_CS  5  // SS
#define TFT_SDI 3  // MOSI
#define TFT_CLK 2  // SCK
#define TFT_LED 0   // 0 if wired to +5V directly;
#endif

#define TFT_BRIGHTNESS 200 // Initial brightness of TFT backlight (optional)

// Use hardware SPI (faster - on Uno: 13-SCK, 12-MISO, 11-MOSI)
TFT_22_ILI9225 tft = TFT_22_ILI9225(TFT_RST, TFT_RS, TFT_CS, TFT_LED, TFT_BRIGHTNESS);
// Use software SPI (slower)
//TFT_22_ILI9225 tft = TFT_22_ILI9225(TFT_RST, TFT_RS, TFT_CS, TFT_SDI, TFT_CLK, TFT_LED, TFT_BRIGHTNESS);

// Variables and constants
int16_t x=0, y=0, w, h;

// Setup
void setup() {
  tft.begin();
  tft.clear();

  // Draw first string in big font
  String s1 = "6789";
  tft.setGFXFont(&FreeSans24pt7b); // Set current font
  tft.getGFXTextExtent(s1, x, y, &w, &h); // Get string extents
  y = h; // Set y position to string height
  tft.drawGFXText(x, y, s1, COLOR_RED); // Print string

  // Draw second string in smaller font
  tft.setGFXFont(&FreeSans12pt7b);  // Change font
  String s2 = "Hello"; // Create string object
  tft.getGFXTextExtent(s2, x, y, &w, &h); // Get string extents
  y += h + 10; // Set y position to string height plus shift down 10 pixels
  tft.drawGFXText(x, y, s2, COLOR_BLUE); // Print string

  // Draw third string in same font
  String s3 = "World!"; // Create string object
  y += h + 2; // Set y position to previous string height plus shift down 2 pixels
  tft.drawGFXText(x, y, s3, COLOR_GREEN); // Print string
}

// Loop
void loop() {
}
Nkawu commented 3 years ago

Unfortunately I have never used the library on any hardware platform than Arduinos, most have been contributed by other people. Hopefully someone can comment and help?

Google translated: Hello, I am having problems using this library with raspberry pi pico, I use platformio in visual studio code, the errors are the following:

Dresch123 commented 2 years ago

I did get your library running with the Raspberry Pico Pi TFT_22_ILI9225.zip This was done with Arduino 1.8.15 and using the MBed RS2040 board selection. All mods are in the zip file. Let me know if you have any questions. Bill Triangles

Fonts

Laky2k8 commented 2 years ago

I did get your library running with the Raspberry Pico Pi TFT_22_ILI9225.zip This was done with Arduino 1.8.15 and using the MBed RS2040 board selection. All mods are in the zip file. Let me know if you have any questions. Bill Triangles

Fonts

Hi! Can you show how you wired it up? Like to what ports and such. Also, can you send in the code you're running? It would be much appreciated! :)

Nkawu commented 2 years ago

Great work @Dresch123 ! I'll attempt to integrate the changes into the main library.