lvgl_esp32_drivers/lvgl_tft/GC9A01.h
Rop Gonggrijp 7b571a7fc7 LV_DISP_USE_RST
Allows to not allocate a GPIO for display reset: some may have that pin tied or attached to a Power management IC.

Supersedes PR from @usedbytes doing same but only for IL9341, this is for all supported displays.
2021-04-28 11:04:53 +02:00

67 lines
1.3 KiB
C

/**
* @file lv_templ.h
*
*/
#ifndef GC9A01_H
#define GC9A01_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include <stdbool.h>
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif
#include "../lvgl_helpers.h"
/*********************
* DEFINES
*********************/
#define GC9A01_DC CONFIG_LV_DISP_PIN_DC
#define GC9A01_RST CONFIG_LV_DISP_PIN_RST
#define GC9A01_USE_RST CONFIG_LV_DISP_USE_RST
#define GC9A01_BCKL CONFIG_LV_DISP_PIN_BCKL
#define GC9A01_ENABLE_BACKLIGHT_CONTROL CONFIG_LV_ENABLE_BACKLIGHT_CONTROL
#if CONFIG_LV_BACKLIGHT_ACTIVE_LVL
#define GC9A01_BCKL_ACTIVE_LVL 1
#else
#define GC9A01_BCKL_ACTIVE_LVL 0
#endif
#define GC9A01_INVERT_COLORS CONFIG_LV_INVERT_COLORS
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
void GC9A01_init(void);
void GC9A01_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * color_map);
void GC9A01_enable_backlight(bool backlight);
void GC9A01_sleep_in(void);
void GC9A01_sleep_out(void);
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*GC9A01_H*/