rt-thread-official/bsp/mini2440/drivers/touch.h

33 lines
623 B
C
Raw Permalink Normal View History

2013-01-08 22:40:58 +08:00
#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
2013-01-08 22:40:58 +08:00
#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;
2013-01-08 22:40:58 +08:00
};
struct rt_touch_event
{
rt_uint16_t x;
rt_uint16_t y;
int pressed;
2013-01-08 22:40:58 +08:00
};
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);
2013-01-08 22:40:58 +08:00
#endif