blob: 0644f1a7036007637bb8e68e174ff49ed89b6043 [file] [log] [blame]
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001/* Header file for:
2 * Cypress TrueTouch(TM) Standard Product touchscreen drivers.
3 * include/linux/cyttsp.h
4 *
5 * Copyright (C) 2009, 2010 Cypress Semiconductor, Inc.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * version 2, and only version 2, as published by the
10 * Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 *
21 * Cypress reserves the right to make changes without further notice
22 * to the materials described herein. Cypress does not assume any
23 * liability arising out of the application described herein.
24 *
25 * Contact Cypress Semiconductor at www.cypress.com
26 *
27 */
28
29
30#ifndef __CYTTSP_H__
31#define __CYTTSP_H__
32
33#include <linux/input.h>
34#include <linux/timer.h>
35#include <linux/workqueue.h>
36#include <linux/kernel.h>
37#include <linux/delay.h>
38
39#include <asm/mach-types.h>
40
41#define CYPRESS_TTSP_NAME "cyttsp"
42#define CY_I2C_NAME "cyttsp-i2c"
43#define CY_SPI_NAME "cyttsp-spi"
44
45#ifdef CY_DECLARE_GLOBALS
46 uint32_t cyttsp_tsdebug;
47 module_param_named(tsdebug, cyttsp_tsdebug, uint, 0664);
48 uint32_t cyttsp_tsxdebug;
49 module_param_named(tsxdebug, cyttsp_tsxdebug, uint, 0664);
50
51 uint32_t cyttsp_disable_touch;
52 module_param_named(disable_touch, cyttsp_disable_touch, uint, 0664);
53#else
54 extern uint32_t cyttsp_tsdebug;
55 extern uint32_t cyttsp_tsxdebug;
56 extern uint32_t cyttsp_disable_touch;
57#endif
58
59
60
61/******************************************************************************
62 * Global Control, Used to control the behavior of the driver
63 */
64
65/* defines for Gen2 (Txx2xx); Gen3 (Txx3xx)
66 * use these defines to set cyttsp_platform_data.gen in board config file
67 */
68#define CY_GEN2 2
69#define CY_GEN3 3
70
71/* define for using I2C driver
72 */
73#define CY_USE_I2C_DRIVER
74
75/* defines for using SPI driver */
76/*
77#define CY_USE_SPI_DRIVER
78 */
79#define CY_SPI_DFLT_SPEED_HZ 1000000
80#define CY_SPI_MAX_SPEED_HZ 4000000
81#define CY_SPI_SPEED_HZ CY_SPI_DFLT_SPEED_HZ
82#define CY_SPI_BITS_PER_WORD 8
83#define CY_SPI_DAV 139 /* set correct gpio id */
84#define CY_SPI_BUFSIZE 512
85
86/* Voltage and Current ratings */
87#define CY_TMA300_VTG_MAX_UV 5500000
88#define CY_TMA300_VTG_MIN_UV 1710000
89#define CY_TMA300_CURR_24HZ_UA 17500
90#define CY_I2C_VTG_MAX_UV 1800000
91#define CY_I2C_VTG_MIN_UV 1800000
92#define CY_I2C_CURR_UA 9630
93
94
95/* define for inclusion of TTSP App Update Load File
96 * use this define if update to the TTSP Device is desired
97 */
98/*
99#define CY_INCLUDE_LOAD_FILE
100*/
101
102/* define if force new load file for bootloader load */
103/*
104#define CY_FORCE_FW_UPDATE
105*/
106
107/* undef for production use */
108/*
109#define CY_USE_DEBUG
110*/
111
112/* undef for irq use; use this define in the board configuration file */
113/*
114#define CY_USE_TIMER
115 */
116
117/* undef to allow use of extra debug capability */
118/*
119#define CY_ALLOW_EXTRA_DEBUG
120*/
121
122/* undef to remove additional debug prints */
123/*
124#define CY_USE_EXTRA_DEBUG
125*/
126
127/* undef to remove additional debug prints */
128/*
129#define CY_USE_EXTRA_DEBUG1
130 */
131
132/* undef to use operational touch timer jiffies; else use test jiffies */
133/*
134 */
135#define CY_USE_TIMER_DEBUG
136
137/* define to use canned test data */
138/*
139#define CY_USE_TEST_DATA
140 */
141
142/* define to activate power management */
143/*
144#define CY_USE_LOW_POWER
145 */
146
147/* define if wake on i2c addr is activated */
148/*
149#define CY_USE_DEEP_SLEEP
150 */
151
152/* define if gesture signaling is used
153 * and which gesture groups to use
154 */
155/*
156#define CY_USE_GEST
157#define CY_USE_GEST_GRP1
158#define CY_USE_GEST_GRP2
159#define CY_USE_GEST_GRP3
160#define CY_USE_GEST_GRP4
161 */
162/* Active distance in pixels for a gesture to be reported
163 * if set to 0, then all gesture movements are reported
164 */
165#define CY_ACT_DIST_DFLT 8
166#define CY_ACT_DIST CY_ACT_DIST_DFLT
167
168/* define if MT signals are desired */
169/*
170*/
171#define CY_USE_MT_SIGNALS
172
173/* define if MT tracking id signals are used */
174/*
175#define CY_USE_MT_TRACK_ID
176 */
177
178/* define if ST signals are required */
179/*
180*/
181#define CY_USE_ST_SIGNALS
182
183/* define to send handshake to device */
184/*
185*/
186#define CY_USE_HNDSHK
187
188/* define if log all raw motion signals to a sysfs file */
189/*
190#define CY_LOG_TO_FILE
191*/
192
193
194/* End of the Global Control section
195 ******************************************************************************
196 */
197#define CY_DIFF(m, n) ((m) != (n))
198
199#ifdef CY_LOG_TO_FILE
200 #define cyttsp_openlog() /* use sysfs */
201#else
202 #define cyttsp_openlog()
203#endif /* CY_LOG_TO_FILE */
204
205/* see kernel.h for pr_xxx def'ns */
206#define cyttsp_info(f, a...) pr_info("%s:" f, __func__ , ## a)
207#define cyttsp_error(f, a...) pr_err("%s:" f, __func__ , ## a)
208#define cyttsp_alert(f, a...) pr_alert("%s:" f, __func__ , ## a)
209
210#ifdef CY_USE_DEBUG
211 #define cyttsp_debug(f, a...) pr_alert("%s:" f, __func__ , ## a)
212#else
213 #define cyttsp_debug(f, a...) {if (cyttsp_tsdebug) \
214 pr_alert("%s:" f, __func__ , ## a); }
215#endif /* CY_USE_DEBUG */
216
217#ifdef CY_ALLOW_EXTRA_DEBUG
218#ifdef CY_USE_EXTRA_DEBUG
219 #define cyttsp_xdebug(f, a...) pr_alert("%s:" f, __func__ , ## a)
220#else
221 #define cyttsp_xdebug(f, a...) {if (cyttsp_tsxdebug) \
222 pr_alert("%s:" f, __func__ , ## a); }
223#endif /* CY_USE_EXTRA_DEBUG */
224
225#ifdef CY_USE_EXTRA_DEBUG1
226 #define cyttsp_xdebug1(f, a...) pr_alert("%s:" f, __func__ , ## a)
227#else
228 #define cyttsp_xdebug1(f, a...)
229#endif /* CY_USE_EXTRA_DEBUG1 */
230#else
231 #define cyttsp_xdebug(f, a...)
232 #define cyttsp_xdebug1(f, a...)
233#endif /* CY_ALLOW_EXTRA_DEBUG */
234
235#ifdef CY_USE_TIMER_DEBUG
236 #define TOUCHSCREEN_TIMEOUT (msecs_to_jiffies(1000))
237#else
238 #define TOUCHSCREEN_TIMEOUT (msecs_to_jiffies(28))
239#endif
240
241/* reduce extra signals in MT only build
242 * be careful not to lose backward compatibility for pre-MT apps
243 */
244#ifdef CY_USE_ST_SIGNALS
245 #define CY_USE_ST 1
246#else
247 #define CY_USE_ST 0
248#endif /* CY_USE_ST_SIGNALS */
249
250/* rely on kernel input.h to define Multi-Touch capability */
251/* if input.h defines the Multi-Touch signals, then use MT */
252#if defined(ABS_MT_TOUCH_MAJOR) && defined(CY_USE_MT_SIGNALS)
253 #define CY_USE_MT 1
254 #define CY_MT_SYNC(input) input_mt_sync(input)
255#else
256 #define CY_USE_MT 0
257 #define CY_MT_SYNC(input)
258 /* the following includes are provided to ensure a compile;
259 * the code that compiles with these defines will not be executed if
260 * the CY_USE_MT is properly used in the platform structure init
261 */
262 #ifndef ABS_MT_TOUCH_MAJOR
263 #define ABS_MT_TOUCH_MAJOR 0x30 /* touching ellipse */
264 #define ABS_MT_TOUCH_MINOR 0x31 /* (omit if circular) */
265 #define ABS_MT_WIDTH_MAJOR 0x32 /* approaching ellipse */
266 #define ABS_MT_WIDTH_MINOR 0x33 /* (omit if circular) */
267 #define ABS_MT_ORIENTATION 0x34 /* Ellipse orientation */
268 #define ABS_MT_POSITION_X 0x35 /* Center X ellipse position */
269 #define ABS_MT_POSITION_Y 0x36 /* Center Y ellipse position */
270 #define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */
271 #define ABS_MT_BLOB_ID 0x38 /* Group set of pkts as blob */
272 #endif /* ABS_MT_TOUCH_MAJOR */
273#endif /* ABS_MT_TOUCH_MAJOR and CY_USE_MT_SIGNALS */
274#if defined(ABS_MT_TRACKING_ID) && defined(CY_USE_MT_TRACK_ID)
275 #define CY_USE_TRACKING_ID 1
276#else
277 #define CY_USE_TRACKING_ID 0
278/* define only if not defined already by system;
279 * value based on linux kernel 2.6.30.10
280 */
281#ifndef ABS_MT_TRACKING_ID
282 #define ABS_MT_TRACKING_ID (ABS_MT_BLOB_ID+1)
283#endif
284#endif /* ABS_MT_TRACKING_ID */
285
286#ifdef CY_USE_DEEP_SLEEP
287 #define CY_USE_DEEP_SLEEP_SEL 0x80
288#else
289 #define CY_USE_DEEP_SLEEP_SEL 0x00
290#endif
291#ifdef CY_USE_LOW_POWER
292 #define CY_USE_SLEEP (CY_USE_DEEP_SLEEP_SEL | 0x01)
293#else
294 #define CY_USE_SLEEP 0x00
295#endif /* CY_USE_LOW_POWER */
296
297#ifdef CY_USE_TEST_DATA
298 #define cyttsp_testdat(ray1, ray2, sizeofray) \
299 { \
300 int i; \
301 u8 *up1 = (u8 *)ray1; \
302 u8 *up2 = (u8 *)ray2; \
303 for (i = 0; i < sizeofray; i++) { \
304 up1[i] = up2[i]; \
305 } \
306 }
307#else
308 #define cyttsp_testdat(xy, test_xy, sizeofray)
309#endif /* CY_USE_TEST_DATA */
310
311/* helper macros */
312#define GET_NUM_TOUCHES(x) ((x) & 0x0F)
313#define GET_TOUCH1_ID(x) (((x) & 0xF0) >> 4)
314#define GET_TOUCH2_ID(x) ((x) & 0x0F)
315#define GET_TOUCH3_ID(x) (((x) & 0xF0) >> 4)
316#define GET_TOUCH4_ID(x) ((x) & 0x0F)
317#define IS_LARGE_AREA(x) (((x) & 0x10) >> 4)
318#define FLIP_DATA_FLAG 0x01
319#define REVERSE_X_FLAG 0x02
320#define REVERSE_Y_FLAG 0x04
321#define FLIP_DATA(flags) ((flags) & FLIP_DATA_FLAG)
322#define REVERSE_X(flags) ((flags) & REVERSE_X_FLAG)
323#define REVERSE_Y(flags) ((flags) & REVERSE_Y_FLAG)
324#define FLIP_XY(x, y) { \
325 u16 tmp; \
326 tmp = (x); \
327 (x) = (y); \
328 (y) = tmp; \
329 }
330#define INVERT_X(x, xmax) ((xmax) - (x))
331#define INVERT_Y(y, maxy) ((maxy) - (y))
332#define SET_HSTMODE(reg, mode) ((reg) & (mode))
333#define GET_HSTMODE(reg) ((reg & 0x70) >> 4)
334#define GET_BOOTLOADERMODE(reg) ((reg & 0x10) >> 4)
335
336/* constant definitions */
337/* maximum number of concurrent ST track IDs */
338#define CY_NUM_ST_TCH_ID 2
339
340/* maximum number of concurrent MT track IDs */
341#define CY_NUM_MT_TCH_ID 4
342
343/* maximum number of track IDs */
344#define CY_NUM_TRK_ID 16
345
346#define CY_NTCH 0 /* no touch (lift off) */
347#define CY_TCH 1 /* active touch (touchdown) */
348#define CY_ST_FNGR1_IDX 0
349#define CY_ST_FNGR2_IDX 1
350#define CY_MT_TCH1_IDX 0
351#define CY_MT_TCH2_IDX 1
352#define CY_MT_TCH3_IDX 2
353#define CY_MT_TCH4_IDX 3
354#define CY_XPOS 0
355#define CY_YPOS 1
356#define CY_IGNR_TCH (-1)
357#define CY_SMALL_TOOL_WIDTH 10
358#define CY_LARGE_TOOL_WIDTH 255
359#define CY_REG_BASE 0x00
360#define CY_REG_GEST_SET 0x1E
361#define CY_REG_ACT_INTRVL 0x1D
362#define CY_REG_TCH_TMOUT (CY_REG_ACT_INTRVL+1)
363#define CY_REG_LP_INTRVL (CY_REG_TCH_TMOUT+1)
364#define CY_SOFT_RESET ((1 << 0))
365#define CY_DEEP_SLEEP ((1 << 1))
366#define CY_LOW_POWER ((1 << 2))
367#define CY_MAXZ 255
368#define CY_OK 0
369#define CY_INIT 1
370#define CY_DLY_DFLT 10 /* ms */
371#define CY_DLY_SYSINFO 20 /* ms */
372#define CY_DLY_BL 300
373#define CY_DLY_DNLOAD 100 /* ms */
374#define CY_NUM_RETRY 4 /* max num touch data read */
375
376/* handshake bit in the hst_mode reg */
377#define CY_HNDSHK_BIT 0x80
378#ifdef CY_USE_HNDSHK
379 #define CY_SEND_HNDSHK 1
380#else
381 #define CY_SEND_HNDSHK 0
382#endif
383
384/* Bootloader File 0 offset */
385#define CY_BL_FILE0 0x00
386
387/* Bootloader command directive */
388#define CY_BL_CMD 0xFF
389
390/* Bootloader Initiate Bootload */
391#define CY_BL_INIT_LOAD 0x38
392
393/* Bootloader Write a Block */
394#define CY_BL_WRITE_BLK 0x39
395
396/* Bootloader Terminate Bootload */
397#define CY_BL_TERMINATE 0x3B
398
399/* Bootloader Exit and Verify Checksum command */
400#define CY_BL_EXIT 0xA5
401
402/* Bootloader default keys */
403#define CY_BL_KEY0 0x00
404#define CY_BL_KEY1 0x01
405#define CY_BL_KEY2 0x02
406#define CY_BL_KEY3 0x03
407#define CY_BL_KEY4 0x04
408#define CY_BL_KEY5 0x05
409#define CY_BL_KEY6 0x06
410#define CY_BL_KEY7 0x07
411
412/* Active Power state scanning/processing refresh interval */
413#define CY_ACT_INTRVL_DFLT 0x00
414
415/* touch timeout for the Active power */
416#define CY_TCH_TMOUT_DFLT 0xFF
417
418/* Low Power state scanning/processing refresh interval */
419#define CY_LP_INTRVL_DFLT 0x0A
420
421#define CY_IDLE_STATE 0
422#define CY_ACTIVE_STATE 1
423#define CY_LOW_PWR_STATE 2
424#define CY_SLEEP_STATE 3
425
426/* device mode bits */
427#define CY_OP_MODE 0x00
428#define CY_SYSINFO_MODE 0x10
429
430/* power mode select bits */
431#define CY_SOFT_RESET_MODE 0x01 /* return to Bootloader mode */
432#define CY_DEEP_SLEEP_MODE 0x02
433#define CY_LOW_PWR_MODE 0x04
434
435#define CY_NUM_KEY 8
436
437#ifdef CY_USE_GEST
438 #define CY_USE_GESTURES 1
439#else
440 #define CY_USE_GESTURES 0
441#endif /* CY_USE_GESTURE_SIGNALS */
442
443#ifdef CY_USE_GEST_GRP1
444 #define CY_GEST_GRP1 0x10
445#else
446 #define CY_GEST_GRP1 0x00
447#endif /* CY_USE_GEST_GRP1 */
448#ifdef CY_USE_GEST_GRP2
449 #define CY_GEST_GRP2 0x20
450#else
451 #define CY_GEST_GRP2 0x00
452#endif /* CY_USE_GEST_GRP2 */
453#ifdef CY_USE_GEST_GRP3
454 #define CY_GEST_GRP3 0x40
455#else
456 #define CY_GEST_GRP3 0x00
457#endif /* CY_USE_GEST_GRP3 */
458#ifdef CY_USE_GEST_GRP4
459 #define CY_GEST_GRP4 0x80
460#else
461 #define CY_GEST_GRP4 0x00
462#endif /* CY_USE_GEST_GRP4 */
463
464struct cyttsp_regulator {
465 const char *name;
466 u32 min_uV;
467 u32 max_uV;
468 u32 load_uA;
469};
470
471struct cyttsp_platform_data {
472 u32 panel_maxx;
473 u32 panel_maxy;
474 u32 disp_resx;
475 u32 disp_resy;
476 u32 disp_minx;
477 u32 disp_miny;
478 u32 disp_maxx;
479 u32 disp_maxy;
480 u8 correct_fw_ver;
481 u32 flags;
482 u8 gen;
483 u8 use_st;
484 u8 use_mt;
485 u8 use_hndshk;
486 u8 use_trk_id;
487 u8 use_sleep;
488 u8 use_gestures;
489 u8 gest_set;
490 u8 act_intrvl;
491 u8 tch_tmout;
492 u8 lp_intrvl;
493 u8 power_state;
494 bool wakeup;
495 int sleep_gpio;
496 int resout_gpio;
497 int irq_gpio;
498 struct cyttsp_regulator *regulator_info;
499 u8 num_regulators;
500 const char *fw_fname;
501#ifdef CY_USE_I2C_DRIVER
502 s32 (*init)(struct i2c_client *client);
503 s32 (*resume)(struct i2c_client *client);
504#endif
505#ifdef CY_USE_SPI_DRIVER
506 s32 (*init)(struct spi_device *spi);
507 s32 (*resume)(struct spi_device *spi);
508#endif
509};
510
511/* TrueTouch Standard Product Gen3 (Txx3xx) interface definition */
512struct cyttsp_gen3_xydata_t {
513 u8 hst_mode;
514 u8 tt_mode;
515 u8 tt_stat;
516 u16 x1 __attribute__ ((packed));
517 u16 y1 __attribute__ ((packed));
518 u8 z1;
519 u8 touch12_id;
520 u16 x2 __attribute__ ((packed));
521 u16 y2 __attribute__ ((packed));
522 u8 z2;
523 u8 gest_cnt;
524 u8 gest_id;
525 u16 x3 __attribute__ ((packed));
526 u16 y3 __attribute__ ((packed));
527 u8 z3;
528 u8 touch34_id;
529 u16 x4 __attribute__ ((packed));
530 u16 y4 __attribute__ ((packed));
531 u8 z4;
532 u8 tt_undef[3];
533 u8 gest_set;
534 u8 tt_reserved;
535};
536
537/* TrueTouch Standard Product Gen2 (Txx2xx) interface definition */
538#define CY_GEN2_NOTOUCH 0x03 /* Both touches removed */
539#define CY_GEN2_GHOST 0x02 /* ghost */
540#define CY_GEN2_2TOUCH 0x03 /* 2 touch; no ghost */
541#define CY_GEN2_1TOUCH 0x01 /* 1 touch only */
542#define CY_GEN2_TOUCH2 0x01 /* 1st touch removed;
543 * 2nd touch remains */
544struct cyttsp_gen2_xydata_t {
545 u8 hst_mode;
546 u8 tt_mode;
547 u8 tt_stat;
548 u16 x1 __attribute__ ((packed));
549 u16 y1 __attribute__ ((packed));
550 u8 z1;
551 u8 evnt_idx;
552 u16 x2 __attribute__ ((packed));
553 u16 y2 __attribute__ ((packed));
554 u8 tt_undef1;
555 u8 gest_cnt;
556 u8 gest_id;
557 u8 tt_undef[14];
558 u8 gest_set;
559 u8 tt_reserved;
560};
561
562/* TTSP System Information interface definition */
563struct cyttsp_sysinfo_data_t {
564 u8 hst_mode;
565 u8 mfg_cmd;
566 u8 mfg_stat;
567 u8 cid[3];
568 u8 tt_undef1;
569 u8 uid[8];
570 u8 bl_verh;
571 u8 bl_verl;
572 u8 tts_verh;
573 u8 tts_verl;
574 u8 app_idh;
575 u8 app_idl;
576 u8 app_verh;
577 u8 app_verl;
578 u8 tt_undef[6];
579 u8 act_intrvl;
580 u8 tch_tmout;
581 u8 lp_intrvl;
582};
583
584/* TTSP Bootloader Register Map interface definition */
585#define CY_BL_CHKSUM_OK 0x01
586struct cyttsp_bootloader_data_t {
587 u8 bl_file;
588 u8 bl_status;
589 u8 bl_error;
590 u8 blver_hi;
591 u8 blver_lo;
592 u8 bld_blver_hi;
593 u8 bld_blver_lo;
594 u8 ttspver_hi;
595 u8 ttspver_lo;
596 u8 appid_hi;
597 u8 appid_lo;
598 u8 appver_hi;
599 u8 appver_lo;
600 u8 cid_0;
601 u8 cid_1;
602 u8 cid_2;
603};
604
605#define cyttsp_wake_data_t cyttsp_gen3_xydata_t
606#ifdef CY_DECLARE_GLOBALS
607 #ifdef CY_INCLUDE_LOAD_FILE
608 /* this file declares:
609 * firmware download block array (cyttsp_fw[]),
610 * the number of command block records (cyttsp_fw_records),
611 * and the version variables
612 */
613 #include "cyttsp_fw.h" /* imports cyttsp_fw[] array */
614 #define cyttsp_app_load() 1
615 #ifdef CY_FORCE_FW_UPDATE
616 #define cyttsp_force_fw_load() 1
617 #else
618 #define cyttsp_force_fw_load() 0
619 #endif
620
621 #else
622 /* the following declarations are to allow
623 * some debugging capability
624 */
625 unsigned char cyttsp_fw_tts_verh = 0x00;
626 unsigned char cyttsp_fw_tts_verl = 0x01;
627 unsigned char cyttsp_fw_app_idh = 0x02;
628 unsigned char cyttsp_fw_app_idl = 0x03;
629 unsigned char cyttsp_fw_app_verh = 0x04;
630 unsigned char cyttsp_fw_app_verl = 0x05;
631 unsigned char cyttsp_fw_cid_0 = 0x06;
632 unsigned char cyttsp_fw_cid_1 = 0x07;
633 unsigned char cyttsp_fw_cid_2 = 0x08;
634 #define cyttsp_app_load() 0
635 #define cyttsp_force_fw_load() 0
636 #endif
637 #define cyttsp_tts_verh() cyttsp_fw_tts_verh
638 #define cyttsp_tts_verl() cyttsp_fw_tts_verl
639 #define cyttsp_app_idh() cyttsp_fw_app_idh
640 #define cyttsp_app_idl() cyttsp_fw_app_idl
641 #define cyttsp_app_verh() cyttsp_fw_app_verh
642 #define cyttsp_app_verl() cyttsp_fw_app_verl
643 #define cyttsp_cid_0() cyttsp_fw_cid_0
644 #define cyttsp_cid_1() cyttsp_fw_cid_1
645 #define cyttsp_cid_2() cyttsp_fw_cid_2
646 #ifdef CY_USE_TEST_DATA
647 static struct cyttsp_gen2_xydata_t tt_gen2_testray[] = {
648 {0x00}, {0x00}, {0x04},
649 {0x4000}, {0x8000}, {0x80},
650 {0x03},
651 {0x2000}, {0x1000}, {0x00},
652 {0x00},
653 {0x00},
654 {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
655 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
656 {0x00},
657 {0x00}
658 };
659
660 static struct cyttsp_gen3_xydata_t tt_gen3_testray[] = {
661 {0x00}, {0x00}, {0x04},
662 {0x4000}, {0x8000}, {0x80},
663 {0x12},
664 {0x2000}, {0x1000}, {0xA0},
665 {0x00}, {0x00},
666 {0x8000}, {0x4000}, {0xB0},
667 {0x34},
668 {0x4000}, {0x1000}, {0xC0},
669 {0x00, 0x00, 0x00},
670 {0x00},
671 {0x00}
672 };
673 #endif /* CY_USE_TEST_DATA */
674
675#else
676 extern u8 g_appload_ray[];
677#endif
678
679#endif /* __CYTTSP_H__ */