Skip to main content
张成.1
Visitor II
December 29, 2020
Question

TouchGFX show

  • December 29, 2020
  • 1 reply
  • 634 views

I write well void TouchGFXHAL::flushFrameBuffer(const touchgfx::Rect& rect).

But there's something wrong with the display.

I want a red background, but I want a white background on the screen.

void TouchGFXHAL::flushFrameBuffer(const touchgfx::Rect& rect)

{

__IO uint16_t* ptr;

LCD_Set_Window(rect.x, rect.y, rect.width, rect.height);

LCD_WriteRAM_Prepare();

for(int rowidx = 0;rowidx<rect.height;rowidx++)

{

ptr = getClientFrameBuffer() + rect.x + (rowidx + rect.y) * lcddev.width;

for(int colidx=0;colidx<rect.width;colidx++)

{

LCD_WriteRAM(*(ptr + colidx));

}

}

}

This topic has been closed for replies.

1 reply

Alexandre RENOUX
Visitor II
January 5, 2021

Hello,

Please provide more information.

  • TouchGFX version
  • CubeMX version
  • Hardware used (MCU, display interface, external RAM, etc.)

You want a red background or a white background ? Sorry I don't understand.

/Alexandre