Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
mtouch.c File Reference
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/input.h>
#include <linux/serio.h>
#include <linux/init.h>

Go to the source code of this file.

Data Structures

struct  mtouch
 

Macros

#define DRIVER_DESC   "MicroTouch serial touchscreen driver"
 
#define MTOUCH_FORMAT_TABLET_STATUS_BIT   0x80
 
#define MTOUCH_FORMAT_TABLET_TOUCH_BIT   0x40
 
#define MTOUCH_FORMAT_TABLET_LENGTH   5
 
#define MTOUCH_RESPONSE_BEGIN_BYTE   0x01
 
#define MTOUCH_RESPONSE_END_BYTE   0x0d
 
#define MTOUCH_MAX_LENGTH   16
 
#define MTOUCH_MIN_XC   0
 
#define MTOUCH_MAX_XC   0x3fff
 
#define MTOUCH_MIN_YC   0
 
#define MTOUCH_MAX_YC   0x3fff
 
#define MTOUCH_GET_XC(data)   (((data[2])<<7) | data[1])
 
#define MTOUCH_GET_YC(data)   (((data[4])<<7) | data[3])
 
#define MTOUCH_GET_TOUCHED(data)   (MTOUCH_FORMAT_TABLET_TOUCH_BIT & data[0])
 

Functions

 MODULE_AUTHOR ("Vojtech Pavlik <[email protected]>")
 
 MODULE_DESCRIPTION (DRIVER_DESC)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DEVICE_TABLE (serio, mtouch_serio_ids)
 
 module_serio_driver (mtouch_drv)
 

Macro Definition Documentation

#define DRIVER_DESC   "MicroTouch serial touchscreen driver"

Definition at line 26 of file mtouch.c.

#define MTOUCH_FORMAT_TABLET_LENGTH   5

Definition at line 38 of file mtouch.c.

#define MTOUCH_FORMAT_TABLET_STATUS_BIT   0x80

Definition at line 36 of file mtouch.c.

#define MTOUCH_FORMAT_TABLET_TOUCH_BIT   0x40

Definition at line 37 of file mtouch.c.

#define MTOUCH_GET_TOUCHED (   data)    (MTOUCH_FORMAT_TABLET_TOUCH_BIT & data[0])

Definition at line 52 of file mtouch.c.

#define MTOUCH_GET_XC (   data)    (((data[2])<<7) | data[1])

Definition at line 50 of file mtouch.c.

#define MTOUCH_GET_YC (   data)    (((data[4])<<7) | data[3])

Definition at line 51 of file mtouch.c.

#define MTOUCH_MAX_LENGTH   16

Definition at line 43 of file mtouch.c.

#define MTOUCH_MAX_XC   0x3fff

Definition at line 46 of file mtouch.c.

#define MTOUCH_MAX_YC   0x3fff

Definition at line 48 of file mtouch.c.

#define MTOUCH_MIN_XC   0

Definition at line 45 of file mtouch.c.

#define MTOUCH_MIN_YC   0

Definition at line 47 of file mtouch.c.

#define MTOUCH_RESPONSE_BEGIN_BYTE   0x01

Definition at line 39 of file mtouch.c.

#define MTOUCH_RESPONSE_END_BYTE   0x0d

Definition at line 40 of file mtouch.c.

Function Documentation

MODULE_AUTHOR ( "Vojtech Pavlik <[email protected]>"  )
MODULE_DESCRIPTION ( DRIVER_DESC  )
MODULE_DEVICE_TABLE ( serio  ,
mtouch_serio_ids   
)
MODULE_LICENSE ( "GPL"  )
module_serio_driver ( mtouch_drv  )