OpenCores
URL https://opencores.org/ocsvn/test_project/test_project/trunk

Subversion Repositories test_project

[/] [test_project/] [trunk/] [linux_sd_driver/] [include/] [linux/] [spi/] [ads7846.h] - Blame information for rev 62

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 62 marcus.erl
/* linux/spi/ads7846.h */
2
 
3
/* Touchscreen characteristics vary between boards and models.  The
4
 * platform_data for the device's "struct device" holds this information.
5
 *
6
 * It's OK if the min/max values are zero.
7
 */
8
enum ads7846_filter {
9
        ADS7846_FILTER_OK,
10
        ADS7846_FILTER_REPEAT,
11
        ADS7846_FILTER_IGNORE,
12
};
13
 
14
struct ads7846_platform_data {
15
        u16     model;                  /* 7843, 7845, 7846. */
16
        u16     vref_delay_usecs;       /* 0 for external vref; etc */
17
        int     keep_vref_on:1;         /* set to keep vref on for differential
18
                                         * measurements as well */
19
 
20
        /* Settling time of the analog signals; a function of Vcc and the
21
         * capacitance on the X/Y drivers.  If set to non-zero, two samples
22
         * are taken with settle_delay us apart, and the second one is used.
23
         * ~150 uSec with 0.01uF caps.
24
         */
25
        u16     settle_delay_usecs;
26
 
27
        /* If set to non-zero, after samples are taken this delay is applied
28
         * and penirq is rechecked, to help avoid false events.  This value
29
         * is affected by the material used to build the touch layer.
30
         */
31
        u16     penirq_recheck_delay_usecs;
32
 
33
        u16     x_plate_ohms;
34
        u16     y_plate_ohms;
35
 
36
        u16     x_min, x_max;
37
        u16     y_min, y_max;
38
        u16     pressure_min, pressure_max;
39
 
40
        u16     debounce_max;           /* max number of additional readings
41
                                         * per sample */
42
        u16     debounce_tol;           /* tolerance used for filtering */
43
        u16     debounce_rep;           /* additional consecutive good readings
44
                                         * required after the first two */
45
        int     (*get_pendown_state)(void);
46
        int     (*filter_init)  (struct ads7846_platform_data *pdata,
47
                                 void **filter_data);
48
        int     (*filter)       (void *filter_data, int data_idx, int *val);
49
        void    (*filter_cleanup)(void *filter_data);
50
};
51
 

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.