{"id":14,"date":"2014-11-30T16:44:11","date_gmt":"2014-11-30T16:44:11","guid":{"rendered":"http:\/\/cooljc.me.uk\/?page_id=14"},"modified":"2015-11-02T12:04:59","modified_gmt":"2015-11-02T12:04:59","slug":"tontec-3-5-tft","status":"publish","type":"page","link":"https:\/\/cooljc.me.uk\/?page_id=14","title":{"rendered":"Tontec 3.5&#8243; TFT"},"content":{"rendered":"<p><a href=\"http:\/\/cooljc.me.uk\/wp-content\/uploads\/2014\/11\/IMG_20141129_105125.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-23\" src=\"http:\/\/cooljc.me.uk\/wp-content\/uploads\/2014\/11\/IMG_20141129_105125-300x192.jpg\" alt=\"IMG_20141129_105125\" width=\"300\" height=\"192\" srcset=\"https:\/\/cooljc.me.uk\/wp-content\/uploads\/2014\/11\/IMG_20141129_105125-300x192.jpg 300w, https:\/\/cooljc.me.uk\/wp-content\/uploads\/2014\/11\/IMG_20141129_105125-1024x657.jpg 1024w, https:\/\/cooljc.me.uk\/wp-content\/uploads\/2014\/11\/IMG_20141129_105125-467x300.jpg 467w, https:\/\/cooljc.me.uk\/wp-content\/uploads\/2014\/11\/IMG_20141129_105125.jpg 1726w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><strong>Update 28\/12\/2014<\/strong>: I have new <a href=\"http:\/\/cooljc.me.uk\/?p=64\">post<\/a> that should now be used for setting up the display and touch screen. It uses the pre-build kernel from Notro rather than my kernel as it will be kept more up to date.<\/p>\n<p><strong>Update 05\/12\/2014<\/strong>:\u00a0Noralf has now included my patches in his master branch of fbtft driver. He will release a new kernel including this driver soon. For more information visit his wiki <a href=\"https:\/\/github.com\/notro\/fbtft\/wiki\">here<\/a>. Of course you can still follow the guide below if you wish to get roll your own kernel. It is also useful as a reference for getting the touch screen working.<\/p>\n<p><strong>Introduction<\/strong><\/p>\n<p>I received this device as a birthday present last weekend. I was keen to get it going so I downloaded the 35screen.zip off the manufactures web site and began running through the user manual. After about 20 minutes I had the screen working \ud83d\ude42 I soon realized that the software (&#8220;driver&#8221;) was quite lame and ran completely in userland (no place for a hardware driver to run). So I took to google and started searching for spi based LCD frame buffer drivers and came across the excellent <a href=\"https:\/\/github.com\/notro\/fbtft\">fbtft<\/a>\u00a0driver by Notro. Reading through the documents in the wiki I soon discovered that the Tontec 3.5&#8243; device was not supported by this driver. So no stranger to some kernel hacking I decided to add support for it.<\/p>\n<p><strong>Adding Support to fbtft<\/strong><\/p>\n<p>First up I forked the code to my own <a href=\"https:\/\/github.com\/cooljc\/fbtft\">github account<\/a>. I then set about trying to locate some datasheets for the screen. This proved very tricky so I gave up and decided to reverse engineer the lame driver that came with it. Browsing the code I came across some references to ili9481, great there might be some light at the end of the tunnel as fbtft already had support for this device. After some initial tests I found it was not as simple as using the existing ili9481 driver. The main differences were the gpio control pins, the device register width, SPI mode and the initial state of the backlight. For the gpio assignments this was taken from the user manual. The other items were worked out from the tontec source code.<\/p>\n<p><strong>Building a custom kernel<\/strong><\/p>\n<p>Before I begin let me explain my setup. I will be using a relatively low end laptop running Ubuntu Linux. Building the kernel (or any other large code base) on the Pi is insane as it would take an age and when your hacking you want to get testing changes as quickly as possible. So all steps below will be run on the PC unless stated otherwise.<\/p>\n<pre class=\"lang:sh decode:true\" title=\"Setting up the build environment \"># Create some directories\r\n\r\n# Start in the users home directory\r\ncd $HOME\r\n\r\n# Create a directory to keep tools and sources in\r\nmkdir touch\r\n\r\n# change into touch directory\r\ncd touch\r\n\r\n# create a fake root fs used for zipping up kernel and models for transfer to Pi\r\nmkdir -p rootfs\/{boot,lib}\r\n\r\n# Clone the raspberry pi kernel source\r\ngit clone https:\/\/github.com\/raspberrypi\/linux.git --depth 1\r\n\r\n# Clone the raspberry pi tools. This includes the cross compiler and mkimage scripts.\r\ngit clone https:\/\/github.com\/raspberrypi\/tools.git --depth 1\r\n\r\n# Clone fbtft into the linux\/drivers\/video directory\r\ncd linux\/drivers\/video\r\ngit clone https:\/\/github.com\/notro\/fbtft.git\r\n\r\n# patch the kernel files to include the new drivers (from fbtft wiki)\r\necho \"obj-y += fbtft\/\" &gt;&gt; Makefile\r\nsed -i 's\/endmenu\/source \"drivers\\\/video\\\/fbtft\\\/Kconfig\"\\n\\nendmenu\/' Kconfig\r\n\r\n# we need to create a symbolic link to the fbtft.h file so it can be included in bcm2708.c\r\ncd ..\/..\/include\/linux\/spi\r\nln -s ..\/..\/..\/drivers\/video\/fbtft\/fbtft.h .\r\n\r\n# change back to the linux source top directory\r\ncd ..\/..\/..\/\r\n\r\n# Setup some environment variables required for cross compiling the kernel\r\n# 1) set the target architecture\r\nexport ARCH=arm\r\n\r\n# 2) add the path to the cross compiler to your shells path\r\n#    I am using the x86_64 version of the compiler.\r\nexport PATH=$HOME\/touch\/tools\/arm-bcm2708\/gcc-linaro-arm-linux-gnueabihf-raspbian-x64\/bin:$PATH\r\n\r\n# 3) set the toolchain prefix\r\nexport CROSS_COMPILE=arm-linux-gnueabihf-\r\n\r\n# 4) set the modules install path to our fake root\r\nexport INSTALL_MOD_PATH=$HOME\/touch\/rootfs\r\n\r\n# 5) prepare for building by using the default Raspberry Pi config\r\nmake bcmrpi_defconfig<\/pre>\n<p>Before beginning the build we need to enable the fbtft drivers (while we at we should also enable the touch screen driver). To enable the drivers we need to run &#8220;make menuconfig&#8221;.<\/p>\n<pre class=\"lang:sh decode:true  \"># run kernel menu config\r\nmake menuconfig<\/pre>\n<p>Using the menu is quite simple. Cursor up, down, left, right, enter and spacebar are the only keys you need to use. So once it is up and running navigate to the following sections (*=built in, m=module, select using spacebar):-<\/p>\n<ul>\n<li>Device Drivers &#8212;&gt;\n<ul>\n<li>Input device support &#8212;&gt;\n<ul>\n<li>[*] Touchscreens &#8212;&gt;\n<ul>\n<li>\u00a0&lt;*&gt;\u00a0ADS7846\/TSC2046\/AD7873 and AD(S)7843 based touchscreens<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>[*] SPI support &#8212;&gt;\n<ul>\n<li>&lt;*&gt;\u00a0BCM2708 SPI controller driver (SPI0) <em>{changed from M to *, gets around modules blacklist problem}<\/em><\/li>\n<\/ul>\n<\/li>\n<li>Graphics support &#8212;&gt;\n<ul>\n<li>\u00a0Console display driver support &#8212;&gt;\n<ul>\n<li>[*]\u00a0Framebuffer Console Rotation<\/li>\n<\/ul>\n<\/li>\n<li>&lt;*&gt; Support for small TFT LCD display modules &#8212;&gt;\n<ul>\n<li>&lt;*&gt; FB driver for the ILI9481 LCD Controller<\/li>\n<li>&lt;*&gt; FB driver for the ILI9486 LCD Controller<\/li>\n<li>&lt;*&gt;\u00a0Module to for adding FBTFT devices<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Once you have selected the options about exit the menu and save the changes when prompted.<\/p>\n<p>Now we also need to edit the arch\/arm\/march-bcm2708\/bcm2708.c board config file to replace the spidev for our tontec35 driver. Without making the change it won&#8217;t be possible for the fbtft driver to claim the SPI port. While we are editing in this area we will also add the config for the touch screen driver (ads7846).<\/p>\n<p>Fisrt open up the file\u00a0arch\/arm\/mach-bcm2708\/bcm2708.c and find\u00a0the section that looks like this:<\/p>\n<pre class=\"lang:c decode:true \" title=\"bcm2708.c\">#ifdef CONFIG_BCM2708_SPIDEV\r\nstatic struct spi_board_info bcm2708_spi_devices[] = {\r\n#ifdef CONFIG_SPI_SPIDEV\r\n\t{\r\n\t\t.modalias = \"spidev\",\r\n\t\t.max_speed_hz = 500000,\r\n\t\t.bus_num = 0,\r\n\t\t.chip_select = 0,\r\n\t\t.mode = SPI_MODE_0,\r\n\t}, {\r\n\t\t.modalias = \"spidev\",\r\n\t\t.max_speed_hz = 500000,\r\n\t\t.bus_num = 0,\r\n\t\t.chip_select = 1,\r\n\t\t.mode = SPI_MODE_0,\r\n\t}\r\n#endif\r\n};\r\n#endif<\/pre>\n<p>Then replace it with the following and save changes:<\/p>\n<pre class=\"lang:c decode:true \" title=\"bcm2708.c\">#ifdef CONFIG_BCM2708_SPIDEV\r\nstatic struct spi_board_info bcm2708_spi_devices[] = {\r\n#if 0 \/* removed as we will specify the display in cmdline.txt using fbtft_device *\/\r\n\t{\r\n\t\t.modalias = \"fb_ili9486\",\r\n\t\t.max_speed_hz = 128000000,\r\n\t\t.mode = SPI_MODE_3,\r\n\t\t.platform_data = &amp;(struct fbtft_platform_data) {\r\n\t\t\t.display = {\r\n\t\t\t\t.regwidth = 8,\r\n\t\t\t\t.buswidth = 8,\r\n\t\t\t\t.backlight = FBTFT_INVERTED_BACKLIGHT_GPIO,\r\n\t\t\t},\r\n\t\t\t.bgr = true,\r\n\t\t\t.rotate = 90, \/* can be 0, 90, 180 or 270 *\/\r\n\t\t\t.gpios = (const struct fbtft_gpio []) {\r\n\t\t\t\t{ \"reset\", 15 },\r\n\t\t\t\t{ \"dc\", 25 },\r\n\t\t\t\t{ \"led\", 18 },\r\n\t\t\t\t{},\r\n\t\t\t},\r\n\t\t}\r\n\t},\r\n#endif\r\n\t{\r\n\t\t.modalias = \"ads7846\",\r\n\t\t.max_speed_hz = 500000,\r\n\t\t.bus_num = 0,\r\n\t\t.chip_select = 1,\r\n\t\t.mode = SPI_MODE_0,\r\n\t\t.irq = GPIO_IRQ_START+4,\r\n\t\t.platform_data = &amp;(struct ads7846_platform_data) {\r\n\t\t\t.model = 7846,\r\n\t\t\t.x_max      = 0x0fff,\r\n\t\t\t.y_max      = 0x0fff,\r\n\t\t\t.x_plate_ohms    = 180,\r\n\t\t\t.pressure_max    = 255,\r\n\t\t\t.debounce_max    = 10,\r\n\t\t\t.debounce_tol    = 3,\r\n\t\t\t.debounce_rep    = 1,\r\n\t\t\t.gpio_pendown    = 4,\r\n\t\t\t.keep_vref_on    = 1,\r\n\t\t\t.swap_xy     = true,\r\n\t\t\t\/*.invert_y    = true*\/\r\n\t\t},\r\n\t}\r\n};\r\n#endif<\/pre>\n<p>We also need to add some header files to the top of this file of the kernel will fail to build.<\/p>\n<pre class=\"lang:c decode:true\">#include &lt;linux\/delay.h&gt;\r\n#include &lt;linux\/spi\/fbtft.h&gt;   \/* &lt;-- New header file *\/\r\n#include &lt;linux\/spi\/ads7846.h&gt; \/* &lt;-- New header file *\/\r\n\r\n#include \"bcm2708.h\"\r\n#include \"armctrl.h\"<\/pre>\n<p>&nbsp;<\/p>\n<p>Ok now its time to build the kernel.<\/p>\n<pre class=\"lang:sh decode:true \" title=\"Building the kernel\"># To build the kernel and the modules\r\n# Note: '-j6' will tell make to fork multiple threads for building. \r\n# This should be used with care. If you have an i3 or i5 CPU use '-j4', i7 could use '-j8'\r\nmake -j6\r\n\r\n# To install the modules into our fake root\r\nmake modules_install\r\n\r\n# copy zImage to dummy root fs\r\ncp arch\/arm\/boot\/zImage ..\/rootfs\/boot\/\r\n\r\n# pack up kernel and modules\r\ncd ..\/rootfs\r\ntar zcf fbtft-kernel.tgz boot lib\r\n\r\n\r\n<\/pre>\n<p>Now you should have a file (fbtft-kernel.tgz) that you can transfer to the RapsberryPi. As I am using Linux and the Pi is also running Linux is simply transfer it using scp. There are many other ways to get the file to your Pi I will let you work it out. But for now here is how I do it:<\/p>\n<pre class=\"lang:sh decode:true\" title=\"Transfer file to Pi using scp\"># transfer .tgz file to Pi\r\nscp fbtft-kernel.tgz pi@&lt;ip address of pi&gt;:.<\/pre>\n<p>Once the file has been transferred you need to install it on the Pi. So login to the Pi (either on the console or via ssh). Then perform the following:<\/p>\n<pre class=\"lang:sh decode:true\" title=\"bash shell on the Raspberry Pi\"># First backup the existing kernel and modules.\r\nsudo cp \/boot\/kernel.img \/boot\/kernel.img.orig\r\nsudo cp -a \/lib\/modules \/lib\/modules.orig\r\nsudo cp -a \/lib\/firmware \/lib\/firmware.orig\r\n\r\n# Now change directory to the location of fbtft-kernel.tgz and unpack it\r\n# the \"-C \/\" is important as it will tell tar to change to \/ before extracting.\r\nsudo tar zxvf fbtft-kernel.tgz -C \/<\/pre>\n<p>Ok almost there. Now we also need to edit \/boot\/cmdline.txt to tell the kernel to use the new framebuffer for console output. We basically add &#8220;fbtft_device.name=tontec35_9486 fbtft_device.rotate=90 fbcon=map:10 fbcon=font:VGA8x8&#8221; before the &#8220;rootwait&#8221; parameter. Note: This should be one line and is probably displayed wrapped in the browser and your text editor.<\/p>\n<p>Example for models with ili9486 displays:<\/p>\n<pre class=\"wrap:true lang:default decode:true\" title=\"\/boot\/cmdline.txt - ili9486 displays\">dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=\/dev\/mmcblk0p2 rootfstype=ext4 elevator=deadline fbtft_device.name=tontec35_9486 fbtft_device.rotate=90 fbcon=map:10 fbcon=font:VGA8x8 rootwait<\/pre>\n<p>Example for models with ili9481 displays. The key difference is the fbtft_device.name=* part:<\/p>\n<pre class=\"wrap:true lang:default decode:true\" title=\"\/boot\/cmdline.txt - ili9481 displays\">dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=\/dev\/mmcblk0p2 rootfstype=ext4 elevator=deadline fbtft_device.name=tontec35_9481 fbtft_device.rotate=90 fbcon=map:10 fbcon=font:VGA8x8 rootwait<\/pre>\n<p>Once you have saved the cmdline.txt and exited your editor you also need to edit \/boot\/config.txt to tell the RPi what kernel to load. Open up the file and look for a line beginning with &#8220;kernel=&#8221;. If this line does not exist add one somewhere in the file like this (added to the bottom of the file):<\/p>\n<pre class=\"lang:default decode:true\" title=\"\/boot\/config.txt\"># uncomment if you get no picture on HDMI for a default \"safe\" mode\r\n#hdmi_safe=1\r\n\r\n# uncomment this if your display has a black border of unused pixels visible\r\n# and your display can output without overscan\r\n#disable_overscan=1\r\n\r\n# uncomment the following to adjust overscan. Use positive numbers if console\r\n# goes off screen, and negative if there is too much border\r\n#overscan_left=16\r\n#overscan_right=16\r\n#overscan_top=16\r\n#overscan_bottom=16\r\n\r\n# uncomment to force a console size. By default it will be display's size minus\r\n# overscan.\r\n#framebuffer_width=1280\r\n#framebuffer_height=720\r\n#framebuffer_width=480\r\n#framebuffer_height=320\r\n\r\n# uncomment if hdmi display is not detected and composite is being output\r\n#hdmi_force_hotplug=1\r\n\r\n# uncomment to force a specific HDMI mode (this will force VGA)\r\n#hdmi_group=1\r\n#hdmi_mode=1\r\n\r\n# uncomment to force a HDMI mode rather than DVI. This can make audio work in\r\n# DMT (computer monitor) modes\r\n#hdmi_drive=2\r\n\r\n# uncomment to increase signal to HDMI, if you have interference, blanking, or\r\n# no display\r\n#config_hdmi_boost=4\r\n\r\n# uncomment for composite PAL\r\n#sdtv_mode=2\r\n\r\n#uncomment to overclock the arm. 700 MHz is the default.\r\n#arm_freq=800\r\n\r\nkernel=zImage\r\n# for more options see http:\/\/elinux.org\/RPi_config.txt<\/pre>\n<p>Once you have saved the config.txt file you can try out the TFT. Type &#8220;sudo reboot&#8221; to restart your Pi. When it comes backup you should now see the console output on your TFT.<\/p>\n<p>Note: If you installed the software provided by Tontec you will want to disable\/remove it before your reboot. If you don&#8217;t then there might be some strange behaviour as the kernel driver and userspace application both try and control the screen. The easiest way to disable it is to comment out the line in &#8220;\/etc\/init.d\/lcd&#8221; that reads &#8220;sudo\u00a0\/home\/pi\/mzl350i-pi-ext\/src\/mzl350i&#8221;.<\/p>\n<p><strong>Pre-built kernel<\/strong><\/p>\n<p>I am aware that most people probably won&#8217;t want to roll your own kernel out so I have uploaded a copy of my kernel <a href=\"https:\/\/dl.dropboxusercontent.com\/u\/62771135\/cooljc.me.uk\/fbtft-kernel-0.2.tgz\">here<\/a> for your convenience. You can follow the following procedure on your Pi to install it:<\/p>\n<p>Update 04\/12\/2014: Added a new kernel image. This image now supports both the ili9481 and the ili9486 displays in the same image. It also adds spi-bcm2708 drivers into the kernel instead of being a module. This enables the screen to start up quicker and removes the need to edit the modules blacklist files. See above for details about selecting correct display in cmdline.txt.<\/p>\n<pre class=\"lang:sh decode:true\" title=\"Quick install on Pi\"># change to your home dir\r\ncd $HOME\r\n\r\n# Download the file\r\nwget https:\/\/dl.dropboxusercontent.com\/u\/62771135\/cooljc.me.uk\/fbtft-kernel-0.2.tgz\r\n\r\n# Backup your existing kernel and modules\r\nsudo cp \/boot\/kernel.img \/boot\/kernel.img.orig\r\nsudo cp -a \/lib\/modules \/lib\/modules.orig\r\nsudo cp -a \/lib\/firmware \/lib\/firmware.orig\r\n\r\n# Now change directory to the location of fbtft-kernel.tgz and unpack it\r\n# the \"-C \/\" is important as it will tell tar to change to \/ before extracting.\r\n# During the extraction you will see some errors about changing ownership of boot\/zImage\r\n# these errors are expected because the \/boot partition is FAT32 and does not support \r\n# unix file permissions. So please ignore these.\r\nsudo tar zxf fbtft-kernel-0.2.tgz -C \/\r\n\r\n# Change cmdline.txt (see above)\r\n# Change config.txt (see above)\r\n\r\n# Reboot the Pi\r\nsudo reboot<\/pre>\n<p><strong>Touch Screen<\/strong><\/p>\n<p>The kernel image described above also includes support for the touch screen. To confirm it works please install the following packages:<\/p>\n<pre class=\"lang:sh decode:true\" title=\"Packages for touch screen\"># Install packages for touch screen\r\nsudo apt-get -y install xinput evtest libts-bin\r\n<\/pre>\n<p>You can confirm that the driver is loaded using the dmesg command.<\/p>\n<pre class=\"lang:sh decode:true \" title=\"Finding the touch screen device\"># grep dmesg for the keyword ADS\r\ndmesg | grep ADS\r\n\r\n# You should see something similar to this:\r\n[    7.452879] input: ADS7846 Touchscreen as \/devices\/platform\/bcm2708_spi.0\/spi_master\/spi0\/spi0.1\/input\/input0<\/pre>\n<p>From the above we can see that the touch screen has been added to input0. This will translate to &#8220;\/dev\/input\/event0&#8221; as a device node. You can confirm that touching the screen generates events using the evtest program.<\/p>\n<pre class=\"lang:sh decode:true\" title=\"Running evtest\"># Run evtest to confirm touch screen events\r\nsudo evtest \/dev\/input\/event0\r\n\r\n# Once running touch the screen and you should see output like this:\r\nInput driver version is 1.0.1\r\nInput device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0\r\nInput device name: \"ADS7846 Touchscreen\"\r\nSupported events:\r\n  Event type 0 (EV_SYN)\r\n  Event type 1 (EV_KEY)\r\n    Event code 330 (BTN_TOUCH)\r\n  Event type 3 (EV_ABS)\r\n    Event code 0 (ABS_X)\r\n      Value   2704\r\n      Min        0\r\n      Max     4095\r\n    Event code 1 (ABS_Y)\r\n      Value   2243\r\n      Min        0\r\n      Max     4095\r\n    Event code 24 (ABS_PRESSURE)\r\n      Value      0\r\n      Min        0\r\n      Max      255\r\nProperties:\r\nTesting ... (interrupt to exit)\r\nEvent: time 1417696810.493844, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1\r\nEvent: time 1417696810.493844, type 3 (EV_ABS), code 0 (ABS_X), value 2608\r\nEvent: time 1417696810.493844, type 3 (EV_ABS), code 1 (ABS_Y), value 1216\r\nEvent: time 1417696810.493844, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 79\r\nEvent: time 1417696810.493844, -------------- SYN_REPORT ------------\r\nEvent: time 1417696810.502793, type 3 (EV_ABS), code 0 (ABS_X), value 2640\r\nEvent: time 1417696810.502793, type 3 (EV_ABS), code 1 (ABS_Y), value 1238\r\nEvent: time 1417696810.502793, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 127\r\nEvent: time 1417696810.502793, -------------- SYN_REPORT ------------\r\nEvent: time 1417696810.515987, type 3 (EV_ABS), code 0 (ABS_X), value 2680\r\nEvent: time 1417696810.515987, type 3 (EV_ABS), code 1 (ABS_Y), value 1256\r\nEvent: time 1417696810.515987, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 155\r\nEvent: time 1417696810.515987, -------------- SYN_REPORT ------------\r\nEvent: time 1417696810.522074, type 3 (EV_ABS), code 0 (ABS_X), value 2693\r\nEvent: time 1417696810.522074, type 3 (EV_ABS), code 1 (ABS_Y), value 1253\r\nEvent: time 1417696810.522074, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 158\r\nEvent: time 1417696810.522074, -------------- SYN_REPORT ------------\r\nEvent: time 1417696810.532391, type 3 (EV_ABS), code 0 (ABS_X), value 2706\r\nEvent: time 1417696810.532391, type 3 (EV_ABS), code 1 (ABS_Y), value 1252\r\nEvent: time 1417696810.532391, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 162\r\nEvent: time 1417696810.532391, -------------- SYN_REPORT ------------<\/pre>\n<p>You can also try the ts_test and\u00a0ts_calibrate. These use libts and have some basic graphics.<\/p>\n<pre class=\"lang:default decode:true \"># Run ts_calibrate\r\nsudo TSLIB_FBDEVICE=\/dev\/fb1 TSLIB_TSDEVICE=\/dev\/input\/event0 ts_calibrate\r\n\r\n# Run ts_test\r\nsudo TSLIB_FBDEVICE=\/dev\/fb1 TSLIB_TSDEVICE=\/dev\/input\/event0 ts_test<\/pre>\n<p>I am yet to try X-Windows. Once I have more information on this I will update the page.<\/p>\n<p>&nbsp;<\/p>\n<p>Thanks for reading. Feel free to leave comments or questions below.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Update 28\/12\/2014: I have new post that should now be used for setting up the display and touch screen. It uses the pre-build kernel from Notro rather than my kernel as it will be kept more up to date. Update &hellip; <a class=\"more-link\" href=\"https:\/\/cooljc.me.uk\/?page_id=14\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":40,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/cooljc.me.uk\/index.php?rest_route=\/wp\/v2\/pages\/14"}],"collection":[{"href":"https:\/\/cooljc.me.uk\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cooljc.me.uk\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cooljc.me.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cooljc.me.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14"}],"version-history":[{"count":37,"href":"https:\/\/cooljc.me.uk\/index.php?rest_route=\/wp\/v2\/pages\/14\/revisions"}],"predecessor-version":[{"id":79,"href":"https:\/\/cooljc.me.uk\/index.php?rest_route=\/wp\/v2\/pages\/14\/revisions\/79"}],"up":[{"embeddable":true,"href":"https:\/\/cooljc.me.uk\/index.php?rest_route=\/wp\/v2\/pages\/40"}],"wp:attachment":[{"href":"https:\/\/cooljc.me.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}