Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
h3600_ts_input.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>
#include <linux/delay.h>
#include <mach/hardware.h>
#include <mach/irqs.h>

Go to the source code of this file.

Data Structures

struct  h3600_dev
 

Macros

#define DRIVER_DESC   "H3600 touchscreen driver"
 
#define CHAR_SOF   0x02
 
#define CHAR_EOF   0x03
 
#define FRAME_OVERHEAD   3 /* CHAR_SOF,CHAR_EOF,LENGTH = 3 */
 
#define VERSION_ID   0 /* Get Version (request/response) */
 
#define KEYBD_ID   2 /* Keyboard (event) */
 
#define TOUCHS_ID   3 /* Touch Screen (event)*/
 
#define EEPROM_READ_ID   4 /* (request/response) */
 
#define EEPROM_WRITE_ID   5 /* (request/response) */
 
#define THERMAL_ID   6 /* (request/response) */
 
#define NOTIFY_LED_ID   8 /* (request/response) */
 
#define BATTERY_ID   9 /* (request/response) */
 
#define SPI_READ_ID   0x0b /* ( request/response) */
 
#define SPI_WRITE_ID   0x0c /* ( request/response) */
 
#define FLITE_ID   0x0d /* backlight ( request/response) */
 
#define STX_ID   0xa1 /* extension pack status (req/resp) */
 
#define MAX_ID   14
 
#define H3600_MAX_LENGTH   16
 
#define H3600_KEY   0xf
 
#define H3600_SCANCODE_RECORD   1 /* 1 -> record button */
 
#define H3600_SCANCODE_CALENDAR   2 /* 2 -> calendar */
 
#define H3600_SCANCODE_CONTACTS   3 /* 3 -> contact */
 
#define H3600_SCANCODE_Q   4 /* 4 -> Q button */
 
#define H3600_SCANCODE_START   5 /* 5 -> start menu */
 
#define H3600_SCANCODE_UP   6 /* 6 -> up */
 
#define H3600_SCANCODE_RIGHT   7 /* 7 -> right */
 
#define H3600_SCANCODE_LEFT   8 /* 8 -> left */
 
#define H3600_SCANCODE_DOWN   9 /* 9 -> down */
 
#define STATE_SOF   0 /* start of FRAME */
 
#define STATE_ID   1 /* state where we decode the ID & len */
 
#define STATE_DATA   2 /* state where we decode data */
 
#define STATE_EOF   3 /* state where we decode checksum or EOF */
 

Functions

 MODULE_AUTHOR ("James Simmons <[email protected]>")
 
 MODULE_DESCRIPTION (DRIVER_DESC)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DEVICE_TABLE (serio, h3600ts_serio_ids)
 
 module_serio_driver (h3600ts_drv)
 

Macro Definition Documentation

#define BATTERY_ID   9 /* (request/response) */

Definition at line 72 of file h3600_ts_input.c.

#define CHAR_EOF   0x03

Definition at line 57 of file h3600_ts_input.c.

#define CHAR_SOF   0x02

Definition at line 56 of file h3600_ts_input.c.

#define DRIVER_DESC   "H3600 touchscreen driver"

Definition at line 45 of file h3600_ts_input.c.

#define EEPROM_READ_ID   4 /* (request/response) */

Definition at line 68 of file h3600_ts_input.c.

#define EEPROM_WRITE_ID   5 /* (request/response) */

Definition at line 69 of file h3600_ts_input.c.

#define FLITE_ID   0x0d /* backlight ( request/response) */

Definition at line 75 of file h3600_ts_input.c.

#define FRAME_OVERHEAD   3 /* CHAR_SOF,CHAR_EOF,LENGTH = 3 */

Definition at line 58 of file h3600_ts_input.c.

#define H3600_KEY   0xf

Definition at line 81 of file h3600_ts_input.c.

#define H3600_MAX_LENGTH   16

Definition at line 80 of file h3600_ts_input.c.

#define H3600_SCANCODE_CALENDAR   2 /* 2 -> calendar */

Definition at line 84 of file h3600_ts_input.c.

#define H3600_SCANCODE_CONTACTS   3 /* 3 -> contact */

Definition at line 85 of file h3600_ts_input.c.

#define H3600_SCANCODE_DOWN   9 /* 9 -> down */

Definition at line 91 of file h3600_ts_input.c.

#define H3600_SCANCODE_LEFT   8 /* 8 -> left */

Definition at line 90 of file h3600_ts_input.c.

#define H3600_SCANCODE_Q   4 /* 4 -> Q button */

Definition at line 86 of file h3600_ts_input.c.

#define H3600_SCANCODE_RECORD   1 /* 1 -> record button */

Definition at line 83 of file h3600_ts_input.c.

#define H3600_SCANCODE_RIGHT   7 /* 7 -> right */

Definition at line 89 of file h3600_ts_input.c.

#define H3600_SCANCODE_START   5 /* 5 -> start menu */

Definition at line 87 of file h3600_ts_input.c.

#define H3600_SCANCODE_UP   6 /* 6 -> up */

Definition at line 88 of file h3600_ts_input.c.

#define KEYBD_ID   2 /* Keyboard (event) */

Definition at line 66 of file h3600_ts_input.c.

#define MAX_ID   14

Definition at line 78 of file h3600_ts_input.c.

#define NOTIFY_LED_ID   8 /* (request/response) */

Definition at line 71 of file h3600_ts_input.c.

#define SPI_READ_ID   0x0b /* ( request/response) */

Definition at line 73 of file h3600_ts_input.c.

#define SPI_WRITE_ID   0x0c /* ( request/response) */

Definition at line 74 of file h3600_ts_input.c.

#define STATE_DATA   2 /* state where we decode data */

Definition at line 295 of file h3600_ts_input.c.

#define STATE_EOF   3 /* state where we decode checksum or EOF */

Definition at line 296 of file h3600_ts_input.c.

#define STATE_ID   1 /* state where we decode the ID & len */

Definition at line 294 of file h3600_ts_input.c.

#define STATE_SOF   0 /* start of FRAME */

Definition at line 293 of file h3600_ts_input.c.

#define STX_ID   0xa1 /* extension pack status (req/resp) */

Definition at line 76 of file h3600_ts_input.c.

#define THERMAL_ID   6 /* (request/response) */

Definition at line 70 of file h3600_ts_input.c.

#define TOUCHS_ID   3 /* Touch Screen (event)*/

Definition at line 67 of file h3600_ts_input.c.

#define VERSION_ID   0 /* Get Version (request/response) */

Definition at line 65 of file h3600_ts_input.c.

Function Documentation

MODULE_AUTHOR ( "James Simmons <[email protected]>"  )
MODULE_DESCRIPTION ( DRIVER_DESC  )
MODULE_DEVICE_TABLE ( serio  ,
h3600ts_serio_ids   
)
MODULE_LICENSE ( "GPL"  )
module_serio_driver ( h3600ts_drv  )