1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2008 by Maurus Cuelenaere
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.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef __TOUCHSCREEN_INCLUDE_H_
23 #define __TOUCHSCREEN_INCLUDE_H_
25 struct touchscreen_calibration
31 struct touchscreen_parameter
39 TOUCHSCREEN_POINT
= 0, /* touchscreen returns pixel co-ords */
40 TOUCHSCREEN_BUTTON
, /* touchscreen returns BUTTON_* area codes
41 actual pixel value will still be accessible
42 from button_get_data */
45 extern struct touchscreen_parameter calibration_parameters
;
46 extern const struct touchscreen_parameter default_calibration_parameters
;
47 int touchscreen_calibrate(struct touchscreen_calibration
*cal
);
48 int touchscreen_to_pixels(int x
, int y
, int *data
);
49 void touchscreen_set_mode(enum touchscreen_mode mode
);
50 enum touchscreen_mode
touchscreen_get_mode(void);
51 void touchscreen_disable_mapping(void);
52 void touchscreen_reset_mapping(void);
54 #endif /* __TOUCHSCREEN_INCLUDE_H_ */