将lv_drivers 中的 lv_drv_conf_template.h 文件复制到 lvgl_demo 中并且改名为 lv_drv_conf.h; 创建好的工程目录如图所示: 修改配置 修改lv_drv_conf.h 将#if 0 改成#if 1: 将USE_FBDEV 的值改为 1,使能 frame buffer 设备: 将USE_EVDEV 的值改为 1,配置触控输入设备的文件路径: 修改lv_conf...
888 /*Driver for evdev input devices*/ 889 #define LV_USE_EVDEV 1 在mian.c中添加触摸输入: 需要确定设备的触摸节点(可以使用cat /dev/input/event3测试) intmain(void){lv_init();/*Linux frame buffer device init*/lv_display_t*disp=lv_linux_fbdev_create();lv_linux_fbdev_set_file(disp,"/...
lvgl 使用触控功能,需在应用lv_drv_conf.h 文件中配置: 代码语言:javascript 代码运行次数:0 运行 AI代码解释 # define USE_EVDEV 1 应用lv_drv_conf.h 中的EVDEV_NAME 要与所使用的触摸屏驱动对应,例如 lv_examples 的配置文件: 代码语言:javascript 代码运行次数:0 运行 AI代码解释 lichee/rtos-components/...
USE_FBDEV:在文件 lv_drv_conf.h 中 USE_EVDEV:在文件 lv_drv_conf.h 中 LV_USE_DEMO_WIDGETS:在文件 lv_conf.h,主要作用是启动相应的案例 在编译的过程中会有 lvgl.h 头文件的引用错误。如下所示: #include"../../../lvgl.h" 这是因为我们移动路径导致的,所以只需要将所以文件引用改为#include "...
lvgl 使用触控功能,需在应用lv_drv_conf.h 文件中配置: # define USE_EVDEV 1 应用lv_drv_conf.h中的EVDEV_NAME要与所使用的触摸屏驱动对应,例如lv_examples的配置文件: lichee/rtos-components/thirdparty/littlevgl-8/lv_examples/src/lv_drv_conf.h ...
lvgl 使用触控功能,需在应用lv_drv_conf.h 文件中配置: #defineUSE_EVDEV1 1. 应用lv_drv_conf.h中的EVDEV_NAME要与所使用的触摸屏驱动对应,例如lv_examples的配置文件: lichee/rtos-components/thirdparty/littlevgl-8/lv_examples/src/lv_drv_conf.h ...
#include "../lib/lv_drivers/indev/evdev.h" #include <unistd.h> #include <pthread.h> #include #include <sys/time.h> #define DISP_BUF_SIZE (128 * 1024) int main(void) { /*LittlevGL init*/ lv_init(); /*Linux frame buffer device init*/ fbdev_init...
接着是441~461行,将USE_EVDEV使能,并且触控输入设备的名称要根据自己的板子实际情况更改: 代码语言:javascript 代码运行次数:0 运行 AI代码解释 438 /*--- 439 * Mouse or touchpad as evdev interface (for Linux based systems) 440 *---*/ 441 #ifndef USE_EVDEV 442 # define USE_EVDEV 1 443 #endi...
lv_task_handler(); usleep(5000); } } 根目录make一下 拷贝到板子上试下呗。 7.增加外设 根据实际情况添加 1.加入触摸点击 触摸输入在lv_drv_conf.h # define USE_EVDEV 0 这个 置为1 # define EVDEV_NAME "/dev/input/event0" //这个就是输入设备了看你自己的是event几了。
/*use_evdev*/ 其它的地方暂时不用修改,然后按esc退出编辑模式,输入 :wq保存退出。 修改lv_conf.h 和 lv_drv_conf.h一样需要将一开始的 #if 0改成 #if 1 : 14 /* clang-format off */ 15 # if 1 /*set it to "1" to enable content*/...