Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
hampshire.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  hampshire
 

Macros

#define DRIVER_DESC   "Hampshire serial touchscreen driver"
 
#define HAMPSHIRE_FORMAT_TOUCH_BIT   0x40
 
#define HAMPSHIRE_FORMAT_LENGTH   4
 
#define HAMPSHIRE_RESPONSE_BEGIN_BYTE   0x80
 
#define HAMPSHIRE_MIN_XC   0
 
#define HAMPSHIRE_MAX_XC   0x1000
 
#define HAMPSHIRE_MIN_YC   0
 
#define HAMPSHIRE_MAX_YC   0x1000
 
#define HAMPSHIRE_GET_XC(data)   (((data[3] & 0x0c) >> 2) | (data[1] << 2) | ((data[0] & 0x38) << 6))
 
#define HAMPSHIRE_GET_YC(data)   ((data[3] & 0x03) | (data[2] << 2) | ((data[0] & 0x07) << 9))
 
#define HAMPSHIRE_GET_TOUCHED(data)   (HAMPSHIRE_FORMAT_TOUCH_BIT & data[0])
 

Functions

 MODULE_AUTHOR ("Adam Bennett <[email protected]>")
 
 MODULE_DESCRIPTION (DRIVER_DESC)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DEVICE_TABLE (serio, hampshire_serio_ids)
 
 module_serio_driver (hampshire_drv)
 

Macro Definition Documentation

#define DRIVER_DESC   "Hampshire serial touchscreen driver"

Definition at line 28 of file hampshire.c.

#define HAMPSHIRE_FORMAT_LENGTH   4

Definition at line 39 of file hampshire.c.

#define HAMPSHIRE_FORMAT_TOUCH_BIT   0x40

Definition at line 38 of file hampshire.c.

#define HAMPSHIRE_GET_TOUCHED (   data)    (HAMPSHIRE_FORMAT_TOUCH_BIT & data[0])

Definition at line 49 of file hampshire.c.

#define HAMPSHIRE_GET_XC (   data)    (((data[3] & 0x0c) >> 2) | (data[1] << 2) | ((data[0] & 0x38) << 6))

Definition at line 47 of file hampshire.c.

#define HAMPSHIRE_GET_YC (   data)    ((data[3] & 0x03) | (data[2] << 2) | ((data[0] & 0x07) << 9))

Definition at line 48 of file hampshire.c.

#define HAMPSHIRE_MAX_XC   0x1000

Definition at line 43 of file hampshire.c.

#define HAMPSHIRE_MAX_YC   0x1000

Definition at line 45 of file hampshire.c.

#define HAMPSHIRE_MIN_XC   0

Definition at line 42 of file hampshire.c.

#define HAMPSHIRE_MIN_YC   0

Definition at line 44 of file hampshire.c.

#define HAMPSHIRE_RESPONSE_BEGIN_BYTE   0x80

Definition at line 40 of file hampshire.c.

Function Documentation

MODULE_AUTHOR ( "Adam Bennett <[email protected]>"  )
MODULE_DESCRIPTION ( DRIVER_DESC  )
MODULE_DEVICE_TABLE ( serio  ,
hampshire_serio_ids   
)
MODULE_LICENSE ( "GPL"  )
module_serio_driver ( hampshire_drv  )