2446 views|0 replies

274

Posts

8

Resources
The OP
 

[Sipeed LicheeRV 86 Panel Review] 4-Transplanting lvgl-Adding touch control [Copy link]

 

In the previous review, we implemented the transplantation of lvgl, and we can add controls to change the display function. But how can a touchpad be without the touch function? Therefore, we need to add touch capabilities to lvgl in this review.

1. Check the touch device of the development board

There are three input devices listed in the /dev/input directory on the LicheeRV 86 development board . After testing, event2 is a touch screen device. As shown in the figure below, use ls /dev/inputthe input device hexdump /dev/input/eventto view the data generated by each touch.

You can also use geteventnaming to view the data of input devices. From the figure below, you can see that event2 corresponds to touch, event1 corresponds to audio input, and event0 corresponds to keyboard.

You can also view the input device information in the directory /proc/bus/input .

Through the above operations, we can know that the touchpad of the development board is /dev/input/event2 , and its corresponding handler is evdev.

2. Add touch function in lvgl

There is only one place that needs to be modified, which is lv_drv_conf.h . Add the touch screen as an input device in this file.

Through the first step, we know that the handler is evdev, so in lv_drv_conf.h ,USE_EVDEV it is set EVDEV_NAMEto /dev/input/event2.

Now you can use the touch screen on the LicheeRV 86 development board. Since the project is too large, I will not re-upload it. You can use the project I shared in the resource center, and then follow the second step to modify it and you can use it.

3. Touch Effects

The effect is as follows. When a key is pressed, the name of the key will change.

This post is from Domestic Chip Exchange
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Related articles more>>
Featured Posts
Briefly describe chip packaging technology

(I) Since Intel Corporation of the United States designed and manufactured a 4-bit microprocessor chip in 1971, in more ...

Infineon Position2Go Development Kit Review - skypinglee

This content is provided by EEWORLD Forum 1. Unboxing I am honored to participate in the evaluation of the Infineon Po ...

Unboxing and verifying BOX function through APP

Charge and perform various tests. Gain in-depth understanding of the performance of various sensors. The detection of a ...

A USB20 communication design for real-time image system.pdf

A USB20 communication design for real-time image system.pdf

【GD32E503 Review】One-month test summary

GD32 got to know each other because of testing. GD32E503V-EVAL development board, core chip GD32E503VET6 (hereinafter re ...

[Fudan Micro FM33LC046N] The second PACK solves the JLINK problem but there is another problem?

Finally I made up my mind to download MDK530, and finally solved the problem that the PACK package could not be installe ...

RT-thread studio installation tutorial

rt-thread studio installation First, you need to make sure that rt-thread studio has been installed Find the SDK Manag ...

[Runhe Neptune Review] Five PWM

PWM: Pulse Width Modulation It is to periodically control the time (duty cycle) of IO pulling high and low to control th ...

Embedded Qt-Simple Network Surveillance Camera

This article uses Qt to implement a network camera function, which includes a server and a client. The server is used ...

[The strongest open source] Hand-rubbed 120W switching power supply

I recently took the time to make a switching power supply 645265 645262 645263 645264 645261 645260

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list