diff options
Diffstat (limited to 'firmware/export')
-rwxr-xr-x | firmware/export/touchscreen.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/firmware/export/touchscreen.h b/firmware/export/touchscreen.h new file mode 100755 index 0000000000..0d8233a522 --- /dev/null +++ b/firmware/export/touchscreen.h | |||
@@ -0,0 +1,48 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2008 by Maurus Cuelenaere | ||
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_INCLUDE_H_ | ||
23 | #define __TOUCHSCREEN_INCLUDE_H_ | ||
24 | |||
25 | struct touchscreen_calibration | ||
26 | { | ||
27 | int x[3]; | ||
28 | int xfb[3]; | ||
29 | int y[3]; | ||
30 | int yfb[3]; | ||
31 | }; | ||
32 | |||
33 | enum touchscreen_mode | ||
34 | { | ||
35 | TOUCHSCREEN_POINT = 0, /* touchscreen returns pixel co-ords */ | ||
36 | TOUCHSCREEN_BUTTON, /* touchscreen returns BUTTON_* area codes | ||
37 | actual pixel value will still be accessible | ||
38 | from button_get_data */ | ||
39 | }; | ||
40 | |||
41 | int touchscreen_calibrate(struct touchscreen_calibration *cal); | ||
42 | int touchscreen_to_pixels(int x, int y, int *data); | ||
43 | void touchscreen_set_mode(enum touchscreen_mode mode); | ||
44 | enum touchscreen_mode touchscreen_get_mode(void); | ||
45 | void touchscreen_disable_mapping(void); | ||
46 | void touchscreen_reset_mapping(void); | ||
47 | |||
48 | #endif /* __TOUCHSCREEN_INCLUDE_H_ */ | ||