Skip to content

xofc/xpt2uinput

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

xpt2uinput

User mode driver for Raspberry Pi's 5 inch 800x480 HDMI/P1 with XPT2046 resistive touchscreen controller

This short (kind of) experimental driver reads XY pos and touch state though the SPI bus (on the connector P1 of Raspberries) and sends events to /dev/uinput. It is to be used with WaveShare 5 Inch HDMI LCD with a P1 connector.

Wiring :

  • P1-19 SPI MOSI
  • P1-21 SPI MISO
  • P1-22 Pen IRQ GPIO low when screen is 'touched'
  • P1-23 SPI clock (mode 0)
  • P1-26 CS1 Chip Select

Relevant documents :

usage : 'sudo ./xpt2uinput

Notes :

  • The calibration is hardwired...
  • Mouse emulation with relative events should probably be more appropriate

HDMI setup in /boot/config.txt

#increase HDMI signal strength (just a black screen if not set!)
config_hdmi_boost=4

#remove black borders
disable_overscan=1

#set specific CVT mode
hdmi_cvt 800 480 60 6 0 0 0

#set CVT as default
hdmi_group=2
hdmi_mode=87

About

User mode driver for Raspberry Pi's 5 inch HDMI/P1 with XPT2046 resistive touchscreen controller

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published