How to control the LCD backlight in Touchgfx on STM32H747I DISCO board
Hi all
I am using stm32H747I-disco board .Can anyone please help with the example to control the brightness of the display
Thank you.
Hi all
I am using stm32H747I-disco board .Can anyone please help with the example to control the brightness of the display
Thank you.
It seem that the Backlight is controlled over CABC signal by default. You don't need to modify anything on the board. It seems the backlight is controlled by the LCD controller itself.
I tested the control of the backlight using void LCD_SetBrightness(int value) declared in TouchGFXHAL.cpp.
For example in Model.cpp:
#include <gui/model/Model.hpp>
#include <gui/model/ModelListener.hpp>
extern "C" {
void LCD_SetBrightness(int value);
}
Model::Model() : modelListener(0)
{
}
volatile int i;
void Model::tick()
{
LCD_SetBrightness(i/60);
i++;
if(i>6000) i = 0;
}
This changes the backlight progressively.
Hope that helps.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.