Giter Site home page Giter Site logo

wshare-touchscreen's Introduction

wshare-touchscreen

Waveshare touchscreen user space driver

I brought a Waveshare 7-inch HDMI LCD and it provides touchscreen through USB. Unfortunately, dvd with raspbian images for raspberry was completely unreadable, so I decided to google problem and have found solution.

But I thought, that writing driver in Python is completely bad idea, and that driver imitated just mouse, not touchscreen, as I needed for my project. So, I decided to implement user space uinput driver, that implements simple (type A) protocol from linux documetation.

Dependencies:

  • libsuinput, version >= 0.6.1
  • pthread
  • C99 compiler
  • libudev

Compile:

gcc -std=c99 -Wall ./waveshare.c -pthread -lsuinput -ludev -o waveshare-touch-driver

Install

  1. Copy file to the path

    sudo cp waveshare-touch-driver /usr/local/bin/waveshare-touch-driver

  2. Edit /etc/rc.local file and append:

    /usr/local/bin/waveshare-touch-driver

  3. Edit /etc/modules and append neccessary uinput kernel module

  4. Reboot

Restrictions

  • Sometimes touchscreen is really buggy. This driver does not perform any data correction
  • For now "clean" /dev/input/eventX source is almost useless for X applications, and you should use additional driver for implementing touchscreen support in X. However it is useful to launch Qt applications in EGLFS mode. Just add QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/eventX to environment variables (where X is device number)

wshare-touchscreen's People

Contributors

110yd avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.