Created separate component for backlight control
-> Uses Timer 0, Channel 0 as PWM to control backlight via LED pin Signed-off-by: Rajssss <sssraj.sssraj@gmail.com>
This commit is contained in:
parent
a17a77b923
commit
5d4334a5b9
6 changed files with 96 additions and 50 deletions
36
lvgl_tft/esp_lcd_backlight.h
Normal file
36
lvgl_tft/esp_lcd_backlight.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
/**
|
||||
* @file esp_lcd_backlight.h
|
||||
*/
|
||||
|
||||
#ifndef ESP_LCD_BACKLIGHT_H
|
||||
#define ESP_LCD_BACKLIGHT_H
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include <stdbool.h>
|
||||
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
|
||||
#include "lvgl.h"
|
||||
#else
|
||||
#include "lvgl/lvgl.h"
|
||||
#endif
|
||||
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#define DISP_PIN_BCKL CONFIG_LV_DISP_PIN_BCKL
|
||||
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
void disp_brightness_control_enable(void);
|
||||
void disp_set_brightness(uint16_t brightness);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /*ESP_LCD_BACKLIGHT_H*/
|
Loading…
Add table
Add a link
Reference in a new issue