cancel
Showing results for 
Search instead for 
Did you mean: 

Drive backlight of the display in TouchGFX

nico23
Senior II

I was looking around to see if it was possible to drive the backlight of the display directly in TouchGFX code without having to pass the information to the backend to toggle it.

I'm currently turning off/on the backlight with

                case CMD_BL_SET_HIGH:
                    HAL_GPIO_WritePin(LCD_BL_ENABLE_GPIO_Port, LCD_BL_ENABLE_Pin, GPIO_PIN_SET);
                    break;
                    
                case CMD_BL_SET_LOW:
                    HAL_GPIO_WritePin(LCD_BL_ENABLE_GPIO_Port, LCD_BL_ENABLE_Pin, GPIO_PIN_RESET);
                    break;

What I would like to do is to:

  • Turn off the backlight (go into "standby mode")
  • If in "standby mode" (it will always be in a certain view when "standby mode" is ON, when a new touch on the display is detected, turns the backlight ON

It seems it could be achieved with TouchGFX Touch Controller, but I'm not sure

My current approach is to have a message with a queue to another task running that triggers the HAL_GPIO_WritePin

Any idea?

0 REPLIES 0