TFT_eSPI icon indicating copy to clipboard operation
TFT_eSPI copied to clipboard

Add parallel bus reads for RP2040

Open tbillion opened this issue 3 years ago • 4 comments

To minimise effort to resolve issues the following should be provided as a minimum:

  1. A description of the problem and the conditions that cause it to occur tft.readPixel does not work with RM68140, not sure if i missed the documentation on this function not being part of the driver which is possible. i have a ton of these screens though, and if this doesn't function its going to spoil it a little bit for me.

  2. IDE (e.g. Arduino or PlatformIO) arduino

  3. TFT_eSPI library version (try the latest, the problem may have been resolved!) from the Manage Libraries... menu lib from github

  4. Board package version (e.g. 2.0.3) available from the Boards Manager... menu latest earl philhower 2.3.2

  5. Procesor, e.g RP2040, ESP32 S3 etc

  6. TFT driver (e.g. ILI9341), a link to the vendors product web page is useful too. RM68140

  7. Interface type (SPI or parallel) parallel

for (i = hh - 1; i >= 0; i--) {
    for (j = 0; j < ww; j++) {

      // if you are attempting to convert this library to use another display library, this
      // is where you may run into issues
      // the libries must have a readPixel function
      rgb = tft.readPixel(j, i);
      tft.setTextColor(TFT_GREEN , TFT_BLACK);
      tft.drawString(String(tft.readPixel(j, i)), 200, 200);
    }
  }

i simplified the code i am trying to achieve and dumped it out of my code into an example and the result is always the same the variable is 0.

tbillion avatar Aug 15 '22 17:08 tbillion

Parallel but reads are currently not supported on RP2040. I will add as a TODO for the future.

Using sprites mat be a workaround option as pixel read works in sprites.

Bodmer avatar Aug 15 '22 18:08 Bodmer

does this work on parallel?

void readRect(int32_t x, int32_t y, int32_t w, int32_t h, uint16_t *data);

tbillion avatar Aug 15 '22 21:08 tbillion

Typo corrected: Parallel bus reads are not supported on RP2040.

Bodmer avatar Aug 15 '22 21:08 Bodmer

awe bummer , thanks bodmer for all the great and amazing things you do! the community wouldn't be as much fun without you !

tbillion avatar Aug 15 '22 21:08 tbillion