fuzev2: prevent button light flickering when accessing µSD
[kugel-rb.git] / firmware / export / touchscreen.h
blob7d1eb4ac8a4a1ae3a261677d0c25a76b0d175ad5
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
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
27 int x[3][2];
28 int y[3][2];
31 struct touchscreen_parameter
33 int A, B, C, D, E, F;
34 int divider;
37 enum touchscreen_mode
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_ */