5 ifeq "${display_rotate}" "0"
6 display_touch_calibration := 200 3950 250 4000
7 else ifeq "${display_rotate}" "2"
8 display_touch_calibration := 3950 200 4000 250
13 ### Waveshare 5 Inch Display ###
16 hdmi_cvt=800 480 60 6 0 0 0
21 dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900
22 # Display is better readable from top direction
23 display_rotate=${display_rotate}
26 define display_ws5inch_cfg :=
28 Identifier "evdev touchscreen catchall"
29 MatchIsTouchscreen "on"
30 Option "Calibration" "${display_touch_calibration}"
31 MatchDevicePath "/dev/input/event*"
36 export display_ws5inch_cfg
38 PACKAGES += xserver-xorg-input-evdev xinput xinput-calibrator
40 .PHONY: _display_ws5inch
41 _config: _display_ws5inch
42 _display_ws5inch: ${CFGROOT} _copy _mount
43 mkdir -p "$${CFGROOT}/usr/share/X11/xorg.conf.d/"
44 printf '%s\n' "$${display_ws5inch_cfg}" >"$${CFGROOT}/usr/share/X11/xorg.conf.d/45-evdev.conf"
45 mkdir -p "$${CFGROOT}/etc/X11/Xsession.d/"
46 printf 'xrandr --size 800x480\n' >"$${CFGROOT}/etc/X11/Xsession.d/10display_resolution"