Modify屏幕BacklightDriver¶
Modify the copied driver file¶
Here is an example of the aw9364 backlight driver:
Initialize¶
In the aw9364_init
function, initialize the control pin LCD_BACKLIGHT_CONTROL_PIN
as a GPIO output and set it to low (turn off the backlight)。
Set backlight brightness¶
In the callback function backligt_set
, convert the brightness percentage passed down from the upper layer(Based on the brightness level supported by the backlight IC),Then pass it to the sif_aw9364_set_backlight
function to set the brightness。
Read backlight brightness¶
In the callback function backligt_get
, use the variable aw9364_bl to return the brightness because this backlight chip does not support reading the brightness level。