I am running Raspbian Lite on a Raspberry Pi Zero. It has a touch sensitive LCD display. I have a (perl) program that reads touch events from /dev/input/event* and responds appropriately.
The problem I have is that the event file name sometimes flips between /dev/input/event0 and event1 after a reboot. Both files always exist.
Why does it do that? What sets the filename that is used?
Is there any way that I can detect which file is "active"? (There are no events on the other filename as far as I can tell.)
Look for the presence of a directory named /dev/input/by-path or /dev/input/by-id. Inside these directories there will be links to your hardware that will persist across boot cycles.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.