Simple Question to Adafruit_ILI9341.h and setAddrWindow

Hello Community
I have simple question to
setAddrWindow
and
pushColor
if I do this what should I get

  tft.setAddrWindow(1, 1, 320 , 240);

  for (uint32_t i = 0; i < XResolution * YResolution; i++)
  {
  tft.pushColor(uint16_t(i));
    }

my screen stays Backgroud Color no change at all.
It’s an ESP32 the display works perfect except this stupid pushcolor
I tested it with the DUE Library and I did not have any Problem.

Maybe someone has a hint for me, where my thinking is wrong.

Hello there!

This may not be the problem, but maybe try putting the XResolution * YResolution in parenthesis.

Do you really want to do this? You will end up with pixels of different colours.

And the setAddrWindow should have arguments: (0, 0, 319 , 239)

I assume that you are in Landscape mode 320x240

David.

There have been some changes to the Adafruit libraries which means a loss of some backwards compatibility. It is necessary to call tft.startWrite(); before the low level function calls and tft.endWrite(); afterwards. This is rather inconvenient but is down to the way the software author decided to handle transaction support and the toggling of the chip select line. See the spitftbitmap example.

e.g.

tft.startWrite();

tft.setAddrWindow(0, 0, 319 , 239);

  for (uint32_t i = 0; i < XResolution * YResolution; i++)
  {
    tft.pushColor(uint16_t(i));
  }

tft.endWrite();

Hi bodmer I was going to write the solution is

tft.startWrite();

tft.pushColor(uint16_t(i)); tft.endWrite();

Thank you guys for helping have a wonderful summer day