2021-09-11 19:21:08 +00:00
|
|
|
#ifndef DISPLAY_PORT_H_
|
|
|
|
#define DISPLAY_PORT_H_
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
|
|
|
|
#include "lvgl.h"
|
|
|
|
#else
|
|
|
|
#include "lvgl/lvgl.h"
|
|
|
|
#endif
|
|
|
|
|
2021-10-01 17:11:28 +00:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
2021-09-19 01:14:35 +00:00
|
|
|
|
2021-09-11 19:21:08 +00:00
|
|
|
/**
|
|
|
|
* Busy wait delay port
|
|
|
|
*
|
|
|
|
* @param drv Pointer to driver See @ref lv_disp_drv_t
|
|
|
|
* @param delay_ms Delay duration in milliseconds
|
|
|
|
*/
|
|
|
|
void display_port_delay(lv_disp_drv_t *drv, uint32_t delay_ms);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Backlight control port
|
|
|
|
*
|
|
|
|
* @param drv Pointer to driver See @ref lv_disp_drv_t
|
|
|
|
* @param state State of the backlight signal
|
|
|
|
*/
|
|
|
|
void display_port_backlight(lv_disp_drv_t *drv, uint8_t state);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* DC signal control port
|
|
|
|
*
|
|
|
|
* @param drv Pointer to driver See @ref lv_disp_drv_t
|
|
|
|
* @param state State of the DC signal, 1 for logic high, 0 for logic low
|
|
|
|
*/
|
|
|
|
void display_port_gpio_dc(lv_disp_drv_t *drv, uint8_t state);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Hardware reset control port
|
|
|
|
*
|
|
|
|
* @param drv Pointer to driver See @ref lv_disp_drv_t
|
|
|
|
* @param state State of the reset signal, 1 for logic high, 0 for logic low
|
|
|
|
*/
|
|
|
|
void display_port_gpio_rst(lv_disp_drv_t *drv, uint8_t state);
|
|
|
|
|
2021-09-19 01:14:35 +00:00
|
|
|
/**
|
|
|
|
* Display is busy port
|
|
|
|
*
|
|
|
|
* @param drv Pointer to driver See @ref lv_disp_drv_t
|
|
|
|
*
|
2021-10-01 17:11:28 +00:00
|
|
|
* @retval Returns false when display is not busy, true otherwise.
|
2021-09-19 01:14:35 +00:00
|
|
|
*/
|
2021-10-01 17:11:28 +00:00
|
|
|
bool display_port_gpio_is_busy(lv_disp_drv_t *drv);
|
2021-09-19 01:14:35 +00:00
|
|
|
|
2021-09-11 19:21:08 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern "C" */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|