diff options
author | Dominik Wenger <domonoky@googlemail.com> | 2009-10-27 20:25:40 +0000 |
---|---|---|
committer | Dominik Wenger <domonoky@googlemail.com> | 2009-10-27 20:25:40 +0000 |
commit | 04ebf48fe4cb7bdd4d125e9e5f2507d03ede6a5b (patch) | |
tree | 0b3b501a59d9a774019d277b0947ee4194de0af4 | |
parent | 6f9724706f4df78a91f3bf9a10b50be109aac996 (diff) | |
download | rockbox-04ebf48fe4cb7bdd4d125e9e5f2507d03ede6a5b.tar.gz rockbox-04ebf48fe4cb7bdd4d125e9e5f2507d03ede6a5b.zip |
Initial touchscreen support for mini2440. Based on D2 touchscreen driver
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23370 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/keymaps/keymap-mini2440.c | 2 | ||||
-rw-r--r-- | firmware/SOURCES | 1 | ||||
-rw-r--r-- | firmware/export/config-cowond2.h | 2 | ||||
-rw-r--r-- | firmware/export/config-mini2440.h | 5 | ||||
-rw-r--r-- | firmware/target/arm/s3c2440/adc-s3c2440.c | 11 | ||||
-rw-r--r-- | firmware/target/arm/s3c2440/mini2440/adc-target.h | 6 | ||||
-rw-r--r-- | firmware/target/arm/s3c2440/mini2440/button-mini2440.c | 11 | ||||
-rw-r--r-- | firmware/target/arm/s3c2440/mini2440/button-target.h | 16 | ||||
-rw-r--r-- | firmware/target/arm/s3c2440/mini2440/touchscreen-mini2440.c | 190 | ||||
-rw-r--r-- | firmware/target/arm/s3c2440/mini2440/touchscreen-target.h | 33 |
10 files changed, 266 insertions, 11 deletions
diff --git a/apps/keymaps/keymap-mini2440.c b/apps/keymaps/keymap-mini2440.c index 4291bdfb68..c53b9ae1c9 100644 --- a/apps/keymaps/keymap-mini2440.c +++ b/apps/keymaps/keymap-mini2440.c | |||
@@ -337,7 +337,7 @@ static const struct button_mapping* get_context_mapping_remote( int context ) | |||
337 | } | 337 | } |
338 | #endif | 338 | #endif |
339 | 339 | ||
340 | const struct button_mapping* get_context_mapping(int context) | 340 | const struct button_mapping* target_get_context_mapping(int context) |
341 | { | 341 | { |
342 | #ifdef HAVE_MINI2440_REMOTE | 342 | #ifdef HAVE_MINI2440_REMOTE |
343 | if (context&CONTEXT_REMOTE) | 343 | if (context&CONTEXT_REMOTE) |
diff --git a/firmware/SOURCES b/firmware/SOURCES index 2c666cb27c..adb54c7a35 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES | |||
@@ -1411,6 +1411,7 @@ target/arm/s3c2440/mini2440/backlight-mini2440.c | |||
1411 | target/arm/s3c2440/mini2440/button-mini2440.c | 1411 | target/arm/s3c2440/mini2440/button-mini2440.c |
1412 | target/arm/s3c2440/mini2440/led-mini2440.c | 1412 | target/arm/s3c2440/mini2440/led-mini2440.c |
1413 | target/arm/s3c2440/mini2440/power-mini2440.c | 1413 | target/arm/s3c2440/mini2440/power-mini2440.c |
1414 | target/arm/s3c2440/mini2440/touchscreen-mini2440.c | ||
1414 | #ifndef BOOTLOADER | 1415 | #ifndef BOOTLOADER |
1415 | target/arm/s3c2440/mini2440/powermgmt-mini2440.c | 1416 | target/arm/s3c2440/mini2440/powermgmt-mini2440.c |
1416 | target/arm/s3c2440/mini2440/pcm-mini2440.c | 1417 | target/arm/s3c2440/mini2440/pcm-mini2440.c |
diff --git a/firmware/export/config-cowond2.h b/firmware/export/config-cowond2.h index 45bf90bbd0..f31c0a81c3 100644 --- a/firmware/export/config-cowond2.h +++ b/firmware/export/config-cowond2.h | |||
@@ -89,7 +89,7 @@ | |||
89 | #define CONFIG_KEYPAD COWOND2_PAD | 89 | #define CONFIG_KEYPAD COWOND2_PAD |
90 | #define HAVE_TOUCHSCREEN | 90 | #define HAVE_TOUCHSCREEN |
91 | #define HAVE_BUTTON_DATA | 91 | #define HAVE_BUTTON_DATA |
92 | 92 | ||
93 | /* The D2 has either a PCF50606 or PCF50635, RTC_D2 handles both */ | 93 | /* The D2 has either a PCF50606 or PCF50635, RTC_D2 handles both */ |
94 | #define CONFIG_RTC RTC_D2 | 94 | #define CONFIG_RTC RTC_D2 |
95 | 95 | ||
diff --git a/firmware/export/config-mini2440.h b/firmware/export/config-mini2440.h index b9d5dadf9c..83505d8994 100644 --- a/firmware/export/config-mini2440.h +++ b/firmware/export/config-mini2440.h | |||
@@ -71,6 +71,8 @@ | |||
71 | 71 | ||
72 | /* Keypad */ | 72 | /* Keypad */ |
73 | #define CONFIG_KEYPAD MINI2440_PAD | 73 | #define CONFIG_KEYPAD MINI2440_PAD |
74 | #define HAVE_TOUCHSCREEN | ||
75 | #define HAVE_BUTTON_DATA | ||
74 | 76 | ||
75 | /* I2C */ | 77 | /* I2C */ |
76 | /* We do not use currently use hardware I2C, but does not build without */ | 78 | /* We do not use currently use hardware I2C, but does not build without */ |
@@ -108,6 +110,9 @@ | |||
108 | /* RMC TODO: what is this for?? */ | 110 | /* RMC TODO: what is this for?? */ |
109 | /* define this if you have access to the pitchscreen */ | 111 | /* define this if you have access to the pitchscreen */ |
110 | #define HAVE_PITCHSCREEN | 112 | #define HAVE_PITCHSCREEN |
113 | #define HAVE_QUICKSCREEN | ||
114 | |||
115 | |||
111 | 116 | ||
112 | /* Define this if you do software codec */ | 117 | /* Define this if you do software codec */ |
113 | #define CONFIG_CODEC SWCODEC | 118 | #define CONFIG_CODEC SWCODEC |
diff --git a/firmware/target/arm/s3c2440/adc-s3c2440.c b/firmware/target/arm/s3c2440/adc-s3c2440.c index fd5151a3bf..f42a3d2b6a 100644 --- a/firmware/target/arm/s3c2440/adc-s3c2440.c +++ b/firmware/target/arm/s3c2440/adc-s3c2440.c | |||
@@ -24,6 +24,10 @@ | |||
24 | #include "adc-target.h" | 24 | #include "adc-target.h" |
25 | #include "kernel.h" | 25 | #include "kernel.h" |
26 | 26 | ||
27 | #ifdef MINI2440 | ||
28 | #include "touchscreen-target.h" | ||
29 | #endif | ||
30 | |||
27 | static unsigned short adc_readings[NUM_ADC_CHANNELS]; | 31 | static unsigned short adc_readings[NUM_ADC_CHANNELS]; |
28 | 32 | ||
29 | /* prototypes */ | 33 | /* prototypes */ |
@@ -122,7 +126,7 @@ static unsigned short __adc_read(int channel) | |||
122 | /* add this to the tick so that the ADC converts are done in the background */ | 126 | /* add this to the tick so that the ADC converts are done in the background */ |
123 | static void adc_tick(void) | 127 | static void adc_tick(void) |
124 | { | 128 | { |
125 | static unsigned channel; | 129 | static unsigned channel=0; |
126 | 130 | ||
127 | /* Check if the End Of Conversion is set */ | 131 | /* Check if the End Of Conversion is set */ |
128 | if (ADCCON & (1<<15)) | 132 | if (ADCCON & (1<<15)) |
@@ -132,7 +136,10 @@ static void adc_tick(void) | |||
132 | { | 136 | { |
133 | channel = 0; | 137 | channel = 0; |
134 | } | 138 | } |
135 | 139 | #ifdef MINI2440 | |
140 | /* interleave a touchscreen read if neccessary */ | ||
141 | touchscreen_scan_device(); | ||
142 | #endif | ||
136 | /* setup the next conversion and start it*/ | 143 | /* setup the next conversion and start it*/ |
137 | ADCCON = (ADCCON & ~(0x7<<3)) | (channel<<3) | 0x01; | 144 | ADCCON = (ADCCON & ~(0x7<<3)) | (channel<<3) | 0x01; |
138 | } | 145 | } |
diff --git a/firmware/target/arm/s3c2440/mini2440/adc-target.h b/firmware/target/arm/s3c2440/mini2440/adc-target.h index 24e878e735..5abf0d06c5 100644 --- a/firmware/target/arm/s3c2440/mini2440/adc-target.h +++ b/firmware/target/arm/s3c2440/mini2440/adc-target.h | |||
@@ -26,16 +26,12 @@ | |||
26 | Channels 4-7 are routed to LCD connector for touchscreen operation if | 26 | Channels 4-7 are routed to LCD connector for touchscreen operation if |
27 | supported by display panel. | 27 | supported by display panel. |
28 | */ | 28 | */ |
29 | #define NUM_ADC_CHANNELS 8 | 29 | #define NUM_ADC_CHANNELS 4 |
30 | 30 | ||
31 | #define ADC_ONBOARD 0 | 31 | #define ADC_ONBOARD 0 |
32 | #define ADC_SPARE_1 1 | 32 | #define ADC_SPARE_1 1 |
33 | #define ADC_SPARE_2 2 | 33 | #define ADC_SPARE_2 2 |
34 | #define ADC_SPARE_3 3 | 34 | #define ADC_SPARE_3 3 |
35 | #define ADC_TSYM 4 | ||
36 | #define ADC_TSYP 5 | ||
37 | #define ADC_TSXM 6 | ||
38 | #define ADC_TSXP 7 | ||
39 | 35 | ||
40 | #define ADC_READ_ERROR 0xFFFF | 36 | #define ADC_READ_ERROR 0xFFFF |
41 | 37 | ||
diff --git a/firmware/target/arm/s3c2440/mini2440/button-mini2440.c b/firmware/target/arm/s3c2440/mini2440/button-mini2440.c index 787c04d1ef..0435f47559 100644 --- a/firmware/target/arm/s3c2440/mini2440/button-mini2440.c +++ b/firmware/target/arm/s3c2440/mini2440/button-mini2440.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include "system.h" | 24 | #include "system.h" |
25 | #include "button.h" | 25 | #include "button.h" |
26 | #include "kernel.h" | 26 | #include "kernel.h" |
27 | #include "touchscreen-target.h" | ||
27 | 28 | ||
28 | void button_init_device(void) | 29 | void button_init_device(void) |
29 | { | 30 | { |
@@ -50,6 +51,8 @@ void button_init_device(void) | |||
50 | S3C2440_GPIO_PULLUP (GPGUP, 9, GPIO_PULLUP_ENABLE); | 51 | S3C2440_GPIO_PULLUP (GPGUP, 9, GPIO_PULLUP_ENABLE); |
51 | S3C2440_GPIO_PULLUP (GPGUP, 10, GPIO_PULLUP_ENABLE); | 52 | S3C2440_GPIO_PULLUP (GPGUP, 10, GPIO_PULLUP_ENABLE); |
52 | 53 | ||
54 | /* init touchscreen */ | ||
55 | touchscreen_init_device(); | ||
53 | } | 56 | } |
54 | 57 | ||
55 | inline bool button_hold(void) | 58 | inline bool button_hold(void) |
@@ -57,12 +60,18 @@ inline bool button_hold(void) | |||
57 | return 0; | 60 | return 0; |
58 | } | 61 | } |
59 | 62 | ||
60 | int button_read_device(void) | 63 | int button_read_device(int* data) |
61 | { | 64 | { |
62 | int btn = BUTTON_NONE; | 65 | int btn = BUTTON_NONE; |
66 | static int old_data = 0; | ||
67 | |||
68 | *data = old_data; | ||
63 | 69 | ||
64 | /* Read the buttons - active low */ | 70 | /* Read the buttons - active low */ |
65 | btn = (GPGDAT & BUTTON_MAIN) ^ BUTTON_MAIN; | 71 | btn = (GPGDAT & BUTTON_MAIN) ^ BUTTON_MAIN; |
72 | |||
73 | /* read touchscreen */ | ||
74 | btn |= touchscreen_read_device(data, &old_data); | ||
66 | 75 | ||
67 | return btn; | 76 | return btn; |
68 | } | 77 | } |
diff --git a/firmware/target/arm/s3c2440/mini2440/button-target.h b/firmware/target/arm/s3c2440/mini2440/button-target.h index 4a84014462..66419b464a 100644 --- a/firmware/target/arm/s3c2440/mini2440/button-target.h +++ b/firmware/target/arm/s3c2440/mini2440/button-target.h | |||
@@ -27,7 +27,7 @@ | |||
27 | 27 | ||
28 | bool button_hold(void); | 28 | bool button_hold(void); |
29 | void button_init_device(void); | 29 | void button_init_device(void); |
30 | int button_read_device(void); | 30 | int button_read_device(int*); |
31 | void touchpad_set_sensitivity(int level); | 31 | void touchpad_set_sensitivity(int level); |
32 | 32 | ||
33 | /* Mini2440 specific button codes */ | 33 | /* Mini2440 specific button codes */ |
@@ -43,6 +43,20 @@ void touchpad_set_sensitivity(int level); | |||
43 | #define BUTTON_SEVEN 0x0200 | 43 | #define BUTTON_SEVEN 0x0200 |
44 | #define BUTTON_EIGHT 0x0400 | 44 | #define BUTTON_EIGHT 0x0400 |
45 | 45 | ||
46 | /* Touch Screen Area Buttons */ | ||
47 | #define BUTTON_TOPLEFT 0x010000 | ||
48 | #define BUTTON_TOPMIDDLE 0x020000 | ||
49 | #define BUTTON_TOPRIGHT 0x040000 | ||
50 | #define BUTTON_MIDLEFT 0x080000 | ||
51 | #define BUTTON_CENTER 0x100000 | ||
52 | #define BUTTON_MIDRIGHT 0x200000 | ||
53 | #define BUTTON_BOTTOMLEFT 0x400000 | ||
54 | #define BUTTON_BOTTOMMIDDLE 0x800000 | ||
55 | #define BUTTON_BOTTOMRIGHT 0x100000 | ||
56 | |||
57 | #define BUTTON_TOUCH 0x200000 | ||
58 | |||
59 | |||
46 | #define BUTTON_MENU BUTTON_ONE | 60 | #define BUTTON_MENU BUTTON_ONE |
47 | #define BUTTON_UP BUTTON_TWO | 61 | #define BUTTON_UP BUTTON_TWO |
48 | #define BUTTON_SELECT BUTTON_THREE | 62 | #define BUTTON_SELECT BUTTON_THREE |
diff --git a/firmware/target/arm/s3c2440/mini2440/touchscreen-mini2440.c b/firmware/target/arm/s3c2440/mini2440/touchscreen-mini2440.c new file mode 100644 index 0000000000..ce7c8d5dd7 --- /dev/null +++ b/firmware/target/arm/s3c2440/mini2440/touchscreen-mini2440.c | |||
@@ -0,0 +1,190 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___void | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2008 by Rob Purchase | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | #include "config.h" | ||
23 | #include "touchscreen-target.h" | ||
24 | #include "adc-target.h" | ||
25 | #include "system.h" | ||
26 | #include "stdlib.h" | ||
27 | #include "button.h" | ||
28 | #include "touchscreen.h" | ||
29 | |||
30 | #define NO_OF_TOUCH_DATA 5 | ||
31 | |||
32 | struct touch_calibration_point { | ||
33 | short px_x; /* known pixel value */ | ||
34 | short px_y; | ||
35 | short val_x; /* touchscreen value at the known pixel */ | ||
36 | short val_y; | ||
37 | }; | ||
38 | |||
39 | static struct touch_calibration_point topleft, bottomright; | ||
40 | |||
41 | static bool touch_available = false; | ||
42 | |||
43 | static short x[NO_OF_TOUCH_DATA], y[NO_OF_TOUCH_DATA]; | ||
44 | |||
45 | /* comparator for qsort */ | ||
46 | static int short_cmp(const void *a, const void *b) | ||
47 | { | ||
48 | return *(short*)a - *(short*)b; | ||
49 | } | ||
50 | |||
51 | static int touch_to_pixels(short val_x, short val_y) | ||
52 | { | ||
53 | short x,y; | ||
54 | |||
55 | x=val_x; | ||
56 | y=val_y; | ||
57 | |||
58 | x = (x-topleft.val_x)*(bottomright.px_x - topleft.px_x) | ||
59 | / (bottomright.val_x - topleft.val_x) + topleft.px_x; | ||
60 | |||
61 | y = (y-topleft.val_y)*(bottomright.px_y - topleft.px_y) | ||
62 | / (bottomright.val_y - topleft.val_y) + topleft.px_y; | ||
63 | |||
64 | if (x < 0) | ||
65 | x = 0; | ||
66 | else if (x>=LCD_WIDTH) | ||
67 | x=LCD_WIDTH-1; | ||
68 | |||
69 | if (y < 0) | ||
70 | y = 0; | ||
71 | else if (y>=LCD_HEIGHT) | ||
72 | y=LCD_HEIGHT-1; | ||
73 | |||
74 | return (x<<16)|y; | ||
75 | } | ||
76 | |||
77 | void touchscreen_init_device() | ||
78 | { | ||
79 | /* set touchscreen adc controller into wait for interrupt mode */ | ||
80 | ADCTSC = 0xd3; /* Wfait,XP-PU,XP_DIS,XM_DIS,YP_dis,YM_end */ | ||
81 | |||
82 | /* Arbitrary touchscreen calibration */ | ||
83 | topleft.px_x = 0; | ||
84 | topleft.px_y = 0; | ||
85 | topleft.val_x = 105; | ||
86 | topleft.val_y = 925; | ||
87 | |||
88 | bottomright.px_x = LCD_WIDTH; | ||
89 | bottomright.px_y = LCD_HEIGHT; | ||
90 | bottomright.val_x = 890; | ||
91 | bottomright.val_y = 105; | ||
92 | |||
93 | touch_available = false; | ||
94 | } | ||
95 | |||
96 | void touchscreen_scan_device() | ||
97 | { | ||
98 | static long last_touch_read = 0; | ||
99 | static int touch_data_index = 0; | ||
100 | |||
101 | int saveADCDLY; | ||
102 | |||
103 | /* check touch state */ | ||
104 | if(ADCDAT1 & (1<<15)) | ||
105 | { | ||
106 | return; | ||
107 | } | ||
108 | |||
109 | if (TIME_AFTER(current_tick, last_touch_read + 1)) | ||
110 | { | ||
111 | /* resets the index if the last touch could not be read 5 times */ | ||
112 | touch_data_index = 0; | ||
113 | } | ||
114 | |||
115 | /* read touch data */ | ||
116 | saveADCDLY = ADCDLY; | ||
117 | ADCDLY = 40000; /*delay ~0.8ms (1/50M)*4000 */ | ||
118 | ADCTSC = (1<<3)|(1<<2); /* pullup disable, seq x,y pos measure */ | ||
119 | /* start adc */ | ||
120 | ADCCON|= 0x1; | ||
121 | /* wait for start and end */ | ||
122 | while(ADCCON & 0x1); | ||
123 | while(!(ADCCON & 0x8000)); | ||
124 | |||
125 | x[touch_data_index] = ADCDAT0&0x3ff; | ||
126 | y[touch_data_index] = ADCDAT1&0x3ff; | ||
127 | |||
128 | ADCTSC = 0xd3; /* back to interrupt mode */ | ||
129 | ADCDLY = saveADCDLY; | ||
130 | |||
131 | touch_data_index++; | ||
132 | |||
133 | if (touch_data_index > NO_OF_TOUCH_DATA - 1) | ||
134 | { | ||
135 | /* coordinates 5 times read */ | ||
136 | touch_available = true; | ||
137 | touch_data_index = 0; | ||
138 | } | ||
139 | last_touch_read = current_tick; | ||
140 | } | ||
141 | |||
142 | int touchscreen_read_device(int *data, int *old_data) | ||
143 | { | ||
144 | int btn = BUTTON_NONE; | ||
145 | static bool touch_hold = false; | ||
146 | static long last_touch = 0; | ||
147 | |||
148 | if (touch_available || touch_hold) | ||
149 | { | ||
150 | short x_touch, y_touch; | ||
151 | static short last_x = 0, last_y = 0; | ||
152 | |||
153 | if (touch_hold) | ||
154 | { | ||
155 | /* get rid of very fast unintended double touches */ | ||
156 | x_touch = last_x; | ||
157 | y_touch = last_y; | ||
158 | } | ||
159 | else | ||
160 | { | ||
161 | /* sort the 5 data taken and use the median value */ | ||
162 | qsort(x, NO_OF_TOUCH_DATA, sizeof(short), short_cmp); | ||
163 | qsort(y, NO_OF_TOUCH_DATA, sizeof(short), short_cmp); | ||
164 | |||
165 | x_touch = last_x = x[(NO_OF_TOUCH_DATA - 1)/2]; | ||
166 | y_touch = last_y = y[(NO_OF_TOUCH_DATA - 1)/2]; | ||
167 | |||
168 | last_touch = current_tick; | ||
169 | |||
170 | touch_hold = true; | ||
171 | touch_available = false; | ||
172 | } | ||
173 | |||
174 | *old_data = *data = touch_to_pixels(x_touch, y_touch); | ||
175 | |||
176 | btn |= touchscreen_to_pixels((*data&0xffff0000) >> 16, | ||
177 | (*data&0x0000ffff), | ||
178 | data); | ||
179 | } | ||
180 | |||
181 | if (TIME_AFTER(current_tick, last_touch + 10)) | ||
182 | { | ||
183 | /* put the touchscreen back into interrupt mode */ | ||
184 | touch_hold = false; | ||
185 | } | ||
186 | |||
187 | return btn; | ||
188 | } | ||
189 | |||
190 | |||
diff --git a/firmware/target/arm/s3c2440/mini2440/touchscreen-target.h b/firmware/target/arm/s3c2440/mini2440/touchscreen-target.h new file mode 100644 index 0000000000..1019a98330 --- /dev/null +++ b/firmware/target/arm/s3c2440/mini2440/touchscreen-target.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2009 by Dominik Wenger | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | #ifndef _TOUCHSCREEN_TARGET_H | ||
23 | #define _TOUCHSCREEN_TARGET_H | ||
24 | |||
25 | /* try to get a touchscreen reading from adc */ | ||
26 | void touchscreen_scan_device(void); | ||
27 | /* init touchscreen driver */ | ||
28 | void touchscreen_init_device(void); | ||
29 | |||
30 | int touchscreen_read_device(int *data, int *old_data); | ||
31 | |||
32 | #endif | ||
33 | |||