-
Notifications
You must be signed in to change notification settings - Fork 0
/
Barc_ts.h
93 lines (74 loc) · 2.21 KB
/
Barc_ts.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/*
*
* Driver for the H3600 Touch Screen and other Atmel controlled devices.
*
* Copyright 2000 Compaq Computer Corporation.
*
* Use consistent with the GNU GPL is permitted,
* provided that this copyright notice is
* preserved in its entirety in all copies and derived works.
*
* COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
* AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
* FITNESS FOR ANY PARTICULAR PURPOSE.
*
* Author: Charles Flynn.
*
* Author: SW.LEE <[email protected]> Modified for S3C2410
* Copyright (C) 2004,2005 TomTom BV <http://www.tomtom.com/>
* Author: Dimitry Andric <[email protected]>
*/
#ifndef __S3C2410_TS_H__
#define __S3C2410_TS_H__
#include <linux/ioctl.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef struct s3c2410_ts_calibration {
int xscale;
int xtrans;
int yscale;
int ytrans;
int xyswap;
} TS_CAL;
typedef struct s3c2410_ts_event {
short pressure;
short x;
short y;
short pad;
} TS_EVENT;
/* Deprecated - do not use */
typedef struct s3c2410_ts_return {
unsigned short pressure;
unsigned short x;
unsigned short y;
unsigned short pad;
} TS_RET;
/* IOCTL cmds user or kernel space */
/* Use 'f' as magic number */
#define IOC_S3C2410_TS_MAGIC 'f'
#define TS_GET_CAL _IOR(IOC_S3C2410_TS_MAGIC, 10, struct s3c2410_ts_calibration)
#define TS_SET_CAL _IOW(IOC_S3C2410_TS_MAGIC, 11, struct s3c2410_ts_calibration)
#define TS_SET_RAW_ON _IOW(IOC_S3C2410_TS_MAGIC,14,0)
#define TS_SET_RAW_OFF _IOW(IOC_S3C2410_TS_MAGIC,15,0)
/* From the original calibrate.h: */
typedef struct Matrix
{
/* This arrangement of values facilitates
* calculations within getDisplayPoint() */
long An; /* A = An/Divider */
long Bn; /* B = Bn/Divider */
long Cn; /* C = Cn/Divider */
long Dn; /* D = Dn/Divider */
long En; /* E = En/Divider */
long Fn; /* F = Fn/Divider */
long Divider;
int xMin; // Stored on FLASH address 0x10c
int xMax; // Stored on FLASH address 0x110
int yMin; // Stored on FLASH address 0x104
int yMax; // Stored on FLASH address 0x108
} MATRIX;
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __S3C2410_TS_H__ */