47 lines
1.0 KiB
C
47 lines
1.0 KiB
C
/**
|
||
* @file e_port_disp.h
|
||
* @brief LVGL Framebuffer display port — Dual‑screen (fb1 & fb2) driver
|
||
*
|
||
* 提供前/背两块屏幕的初始化、反初始化及刷新开关 API。
|
||
*/
|
||
|
||
#ifndef E_PORT_DISP_H
|
||
#define E_PORT_DISP_H
|
||
|
||
#ifdef __cplusplus
|
||
extern "C"
|
||
{
|
||
#endif
|
||
|
||
#include "../lvgl/lvgl.h"
|
||
#include "common/qua_sys_platform.h"
|
||
#include "e_conf.h"
|
||
|
||
typedef struct
|
||
{
|
||
int fb_width; // 显示器宽
|
||
int fb_height; // 显示器高
|
||
// lv_display_t *disp; // 显示器
|
||
lv_obj_t *root_obj;
|
||
char device_id[DEVICE_ID_LENGTH]; // 显示器对应的设备ID
|
||
QUA_VOID *display_handle;
|
||
int8_t device_index; // 设备索引,0为前屏,1为背屏
|
||
} disp_handle_t;
|
||
|
||
int init_dev(void);
|
||
|
||
/**
|
||
* 关闭 framebuffer、解除映射并释放 LVGL 相关资源。
|
||
* 请在应用退出前调用一次。
|
||
*/
|
||
void disp_exit(void);
|
||
|
||
disp_handle_t get_front_display(void);
|
||
disp_handle_t get_back_display(void);
|
||
|
||
#ifdef __cplusplus
|
||
} /* extern "C" */
|
||
#endif
|
||
|
||
#endif /* E_PORT_DISP_H */
|