summaryrefslogtreecommitdiff
path: root/bsp/mini2440/drivers/touch.h
blob: 19d10bf36dbbfadcb7b96851fbbbdf577dc59af8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef __TOUCH_H__
#define __TOUCH_H__

#include <rtthread.h>

#define RT_TOUCH_NORMAL             0
#define RT_TOUCH_CALIBRATION_DATA   1
#define RT_TOUCH_CALIBRATION        2
#define RT_TOUCH_EVENTPOST          3
#define RT_TOUCH_EVENTPOST_PARAM    4

struct calibration_data
{
    rt_uint16_t min_x, max_x;
    rt_uint16_t min_y, max_y;
};

struct rt_touch_event
{
    rt_uint16_t x;
    rt_uint16_t y;  
    int pressed;
};

typedef void (*rt_touch_calibration_func_t)(rt_uint16_t x, rt_uint16_t y);

typedef void (*rt_touch_eventpost_func_t)(void *, struct rt_touch_event *);

int rtgui_touch_hw_init(void);

#endif