11#ifndef __DEV_TOUCH_H__
12#define __DEV_TOUCH_H__
127#define rt_touch_get_ts() time(RT_NULL)
129#define rt_touch_get_ts() rt_tick_get()
133#define RT_TOUCH_VENDOR_UNKNOWN (0)
134#define RT_TOUCH_VENDOR_GT (1)
135#define RT_TOUCH_VENDOR_FT (2)
138#define RT_TOUCH_TYPE_NONE (0)
139#define RT_TOUCH_TYPE_CAPACITANCE (1)
140#define RT_TOUCH_TYPE_RESISTANCE (2)
143#define RT_TOUCH_CTRL_GET_ID (RT_DEVICE_CTRL_BASE(Touch) + 0)
144#define RT_TOUCH_CTRL_GET_INFO (RT_DEVICE_CTRL_BASE(Touch) + 1)
145#define RT_TOUCH_CTRL_SET_MODE (RT_DEVICE_CTRL_BASE(Touch) + 2)
146#define RT_TOUCH_CTRL_SET_X_RANGE (RT_DEVICE_CTRL_BASE(Touch) + 3)
147#define RT_TOUCH_CTRL_SET_Y_RANGE (RT_DEVICE_CTRL_BASE(Touch) + 4)
148#define RT_TOUCH_CTRL_SET_X_TO_Y (RT_DEVICE_CTRL_BASE(Touch) + 5)
149#define RT_TOUCH_CTRL_DISABLE_INT (RT_DEVICE_CTRL_BASE(Touch) + 6)
150#define RT_TOUCH_CTRL_ENABLE_INT (RT_DEVICE_CTRL_BASE(Touch) + 7)
151#define RT_TOUCH_CTRL_POWER_ON (RT_DEVICE_CTRL_BASE(Touch) + 8)
152#define RT_TOUCH_CTRL_POWER_OFF (RT_DEVICE_CTRL_BASE(Touch) + 9)
153#define RT_TOUCH_CTRL_GET_STATUS (RT_DEVICE_CTRL_BASE(Touch) + 10)
156#define RT_TOUCH_EVENT_NONE (0)
157#define RT_TOUCH_EVENT_UP (1)
158#define RT_TOUCH_EVENT_DOWN (2)
159#define RT_TOUCH_EVENT_MOVE (3)
178#ifdef RT_TOUCH_PIN_IRQ
void rt_hw_touch_isr(rt_touch_t touch)
Touch irq handle
int rt_hw_touch_register(rt_touch_t touch, const char *name, rt_uint32_t flag, void *data)
register a touch device
struct rt_touch_device * rt_touch_t
unsigned short rt_uint16_t
struct rt_touch_info info
rt_err_t(* irq_handle)(rt_touch_t touch)
struct rt_touch_config config
const struct rt_touch_ops * ops
rt_err_t(* touch_control)(struct rt_touch_device *touch, int cmd, void *arg)
rt_size_t(* touch_readpoint)(struct rt_touch_device *touch, void *buf, rt_size_t touch_num)