AM335x Touchscreen Driver's Guide

Introduction

Touchscreen controller on AM335x is an 8 channel general purpose ADC, with support for interleaving Touch Screen conversions for a 4-wire resistive panel. A resistive touchscreen operates by applying a voltage across a resistive network and measuring the change in resistance at a given point on the matrix where the screen is touched by an input (stylus or finger). The change in the resistance ratio marks the location on the touchscreen.

Driver Usage

Tslib

Test the working of touchscreen by using the Tslib utility.Tslib is an abstraction layer for touchscreen panel events, as well as a filter stack for the manipulation of those events. Tslib is generally used on embedded devices to provide a common user space interface to touchscreen functionality.

Environment variables

Make sure you have the following settings right.

  • export TSLIB_FBDEVICE=/dev/fb0
This is for the Fbdev device node to be used for display.
  • export TSLIB_TSDEVICE=/dev/input/touchscreen0

Execution

  • First run ts_calibrate to calibrate the touch screen.
  • You can now run ts_test application. This application helps in moving a cross-hair pattern around the LCD touchscreen. The pattern moves with your stylus movements. Also there is a draw option supported. Using your stylus you can write/draw on touchscreen.

Driver Configuration

You can enable touchscreen driver as in the kernel as follows.

Device Drivers  --->
         Input device support  --->
                  [*]  Touchscreens  --->
                           <*>   TI Touchscreen Interface

Building as Loadable Kernel Module

  • Incase if you want to build the drivers as modules, use <M> instead of <*> during menuconfig while selecting the drivers (as shown below). For more information on loadable modules refer Loadable Module HOWTO
Device Drivers  --->
         Input device support  --->
                  [*]  Touchscreens  --->
                           <M>   TI Touchscreen Interface
  • This step applies if the driver is built as module
  1. Do "make modules" to build the Touchscreen driver as module. The module should be present in "drivers/input/touchscreen/ti_tsc.ko".
  2. Load the driver using "ti_tsc.ko".


转载:http://processors.wiki.ti.com/index.php/AM335x_Touchscreen_Driver%27s_Guide

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值